Open TheChymera opened 3 months ago
I feel like I have proposed to add X-
prefix to any metadata field (and possibly column in TSV) for any non-formalized by BIDS field. This is based on how email RFC ??? does it -- you can add arbitrary header field but prefixed with X-. So we have tons of them in the email headers now (e.g. X-Spam-Level
, x-microsoft-spam
) which allows for safe vendoring.
But it didn't gain traction at that point. I fail to find ATM, but I think I also ran it by @rordenlab in the scope of dcm2niix... might find it later unless someone beats me to it.
Good news: since we formalized machine readable schema, it would be quite simple to establish automated migration as part of BIDS 2.0 - 3.0 migration helper.
Pros:
x-
form in many (if not most) cases whenever a specific entry gets accepted into official schemaAnother similar case IIRC it is mime types , see https://en.wikipedia.org/wiki/Media_type#Unregistered_tree . There x-
I saw used , but I now see that x.
is "advised one" there. But the point is the same - having a prefix.
Added consistency
label as only with X- prefix there is consistency that metadata field is actually known to BIDS. Without that there is inconsistent mix of metadata fields known and unknown to BIDS so it is already "flexible" like that. We will retain flexibility of being able to add new fields but in a consistent fashion. If field is perspective for some BEP, could be X-BEP???
to simplify catching/migrating whenever BEP is accepted, or just carry target name and explicitly ignored etc.
I see that currently all officially allowed metadata fields have no -
or _
in them.
In general, does schema or tooling allows (as proceeds without complains) for -
in the metadata field names? (attn @effigies)
Happy to create a separate pull request, but it might be nice to get initial guidance here. This discussion is timely, as seen by dcm2niix issues 881 and 880. From inception, dcm2niix included many keys not formally defined by BIDS. Before BIDS 1.0, @chrisgorgo suggested unilaterally defining keys for fields that did not exist in BIDS. Over time, many contributors have suggested new keys. However, this has caused some issues, as some BEPS choose different key names (in particular ASL and PET). Now that the BIDS specification has a clear mechanism for defining new keys and a democratically selected steering committee, it seems useful to try to develop a consensus on key names before unilaterally introducing them in one tool.
@effigies noted If anything, it would be good to propose defining all of the current fields dcm2niix emits in BIDS.I would advocate for adopting them more-or-less wholesale.
I would be interested in getting feedback from visionaries on this topic (@CPernet , @Remi-Gau, @xiangruili, and @satra come to mind). My proposal would be:
Thank you @neurolabusc ! You are hitting many nails on the head with the desire to formalize all those dcm2niix
already populates.
It is indeed worth filing a separate issue or even IMHO better a PR (easier to discuss any particular one in conversation attached to specific line in diff) to propose those even at the level of current BIDS 1.x for most of them. I have also filed a pair of related issues on ConversionSoftware*
fields - IMHO they should be made more generic.
NB I have wrapped the listing of individual keys into <detail>
construct in your comment to keep discussion on the original issue easier to follow here.
As I commented here (https://github.com/rordenlab/dcm2niix/issues/880#issuecomment-2435604809), I think it is important that dcm2niix
stays responsive to user suggestions for additions to its json metadata, without those individuals needing to formally engage with BIDS.
Also, dcm2niix
is its own stand-alone software. I don't see why new fields added to its json should be forced to have some odd, arbitrary prefix just because those fields don't happen to be formally defined in the BIDS spec.
It is just a matter if dcm2niix
would like to produce "BIDS .json sidecar files" (so understood by BIDS-aware tools etc) or ".json sidecar files"? If there is a desire to produce "BIDS standardized" sidecar files, sure thing there should be a engagement with the standard.
Not unlike is happening in DICOM itself: manufacturers stick tons of custom metadata in vendor specific sections of DICOMs (I guess everyone of dcm2niix developers know how much fun it is to dig through those), and eventually DICOM standardizes some new metadata properties, and manufacturers (slowly) adopt them to facilitate inter-operation with DICOM receiving hardware/software.
I don't see the parallel to Siemens/DICOM. Siemens can (and does) put whatever they want into their own vendor specific DICOM sections.
A more appropriate analogy to what you are proposing as far as I'm concerned is that Siemens should append some common prefix to all the entries in their vendor specific sections, because they aren't formally defined DICOM fields. When you extend the analogy in that fashion, I obviously don't agree with that.
Analogy is exactly that -- here I am proposing to add a "vendor specific" (or arbitrary adhoc) prefix. It then could as well be x-dcm2niix
"vendor specific" field (section) which would contain a dictionary of all extra fields dcm2niix
adds, or just a flattened list of x-
fields dcm2niix decides to add, while at the top level all fields without x-
prefix are the ones (and only those) defined in BIDS.
RE: Get consensus on existing dcm2niix key names, and decide if all can be considered optional.
Any non-documented field can be introduced at any time. If you browse openneuro, you will see many MRI data already have many of the fields you listed (because people use dcm2niix), and the validator skipped over them. So what you are asking is if we should add new optional fields in the spec. - but this is spec motivated not software related (even if in practice, many, most? conversions rely on your tool) - because any software specific things can always be added.
I'd personally have Global Constants as recommended.
As for what should be added to the spec, I have no idea why some of the field you propose are even not mandatory tbh (echo for instance).
Name space collisions came up today in the stimulus BEP discussion ( @yarikoptic ). Perhaps a prefix for arbitrary table columns would help with that, i.e. if we introduce a new column name, to make sure that that isn't misinterpreted with respect to preexisting data.
Not sure if this should be done with entities as well (since we don't support arbitrary entities, even though I think we should)...
In any case if it's just for column names we could use underscore as a prefix for arbitrary column names. If we want to do the same for entities it would need to be somthing uglier like XYZ or similar.