Hi @martin,
Glad you liked what you found. Spec2nii is very much still in development, and I’m very happy to make changes as things move on. I could really do with some GE and Philips test data (phantom with structure, different orientations etc with a screenshot of the right orientations!) so I can get the orientation information working well for those.
I like the idea of having various levels of compliance. In terms of what we definitely need for the lowest level, I agree that we need transmitter/imaging frequency. Should we include receiver bandwidth/dwell-time? As you say it would be in the pixel dimensions, but maybe it should appear in both. I’m wary of defining a reference point for the ppm scale, I think it is better to identify the nucleus and leave users/programs to infer from that if they wish to. I’m also not aware of Siemens DICOMS having that field populated, and I’m not sure how recon programs could calculate it reliably anyway.
The second level could indeed be orientation info - should we have a field in the json indicating if this level of compliance is met?
For the dimensions, I agree with your(?) comments back on the google doc. I think we should have defaults, but then also have the option to specify labels in the json sidecar. I also agree with your thoughts on having coils, dynamics and an “indirect acquisition” as defaults. I could imagine that we could define some specific tags for dimensions, then a catch all “indirect” and some user indices. We could specify options like:
DIM_COIL
DIM_DYN
DIM_INDIRECT
DIM_EDIT
DIM_USER_0
DIM_USER_1
…
DIM_USER_N
With the intention that if you run out of dimensions in the NIfTI file you can switch to multiple files with that same naming convention, so we never hit a limit (maybe someone is doing some in vivo 3D+ NMR somewhere).
For handling vendor naming conventions, we could have an additional JSON parameter for each dimension where a freeform name can be specified. That could be used to store “original” names in. E.g for Siemens twix.
dim_4: DIM_COIL
dim_4_name: “Cha”
dim_5: DIM_USER_0
dim_5_name: “Set”
dim_6: DIM_USER_1
dim_6_name: “Rep”
@admin I’m not sure how much stuff we could pull automatically from headers, it’s hit and miss whether even simple fields get populated correctly by the vendors. However I think we should define a list of fields that could be included. We can start simple (TE,TR,TI) and get more exotic, but we should also define units.
One way that we could have different values for each of these is to have an array associated with each dimension that can have header parameters which overwrite the top level definitions for iterations of that dimension.E.g.
A 1x1x1x2048x32x10 file (32 coils, 10 echo times). In the json it reads
img_freq: 120.3003
TE: 0.001 <— This isn’t required and gets overwritten
dim_4: DIM_COIL
dim_4_name: “Coils”
dim_5: DIM_USER_0
dim_5_name: “Echo time”
dim_5_header: [{TE:0.001},{TE:0.002},…{TE:0.010}] <— these header values are used for each value of this dimension. You can redefine any number of values, but if it isn’t listed a top level one will be used.
Anyway that’s some thoughts from me.