Have the auto-align matrix as a key:value pairs in the JSON file #2141
Replies: 2 comments 6 replies
-
The "original slice prescription" when using AutoAlign is going to be whatever your specified Position and Orientation settings (e.g, Nonetheless, perhaps you could provide an example of the 3 different sets of information in the DICOM header that you are referring to? |
Beta Was this translation helpful? Give feedback.
-
Also, this may be irrelevant, but your description of AutoAlign is not my understanding of how it works. In particular, the AAHScout scan is not "registered to the first of the scouts". Rather, the "AAHScout" scan is used to identify the location of the brain in the scanner space per an algorithm that is controlled by the selected "AutoAlign" setting. Once the position of the brain is known within the scanner space, the requested Position and Orientation offsets can be applied relative to the anatomy. Yes, it can be represented as a composition of transforms, but my understanding is that the process doesn't involve any registration of the AAHScout scan to the "first of the scouts". |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
The developers of dcm2niix referred me here for this feature proposal (see rordenlab/dcm2niix#944).
Background on auto-align
This is a process by Siemens where a short full-head scout is acquired before each run (of e.g. BOLD fMRI) and automatically registered to the first of the scouts to track the position of the head. The transformation matrix from that registration is then applied to the slice prescription of the following run so that it follows the changing head pose. The end result is that the brain remains conveniently aligned in image space despite different poses across runs in scanner space. For partial fov acquisitions (e.g. single slice fMRI in my case), this is crucial for stable measurement of the same brain tissue across runs and sessions in the same subject.
Importantly, all this information, i.e. (1) the original slice prescription, (2) the transformation matrix applied to it and (3) and the transformed slice prescription, ends up in the dicom header. In the nifti however, it seems there is only (3).
The problem
Having the brain already aligned in image space is great, but visualization softwares most often display those images using slice prescription in scanner space, so they appear misaligned. The different slice prescription between runs also complexifies registration. I had some success circumventing these issues by rewriting the data from different runs using the header from the first run, but that does not work when e.g. voxel sizes are not the same, and I so far failed to similarly adjust the header with other tools.
Why auto-align information should be in the JSON file
Solving the issue I think involve changing header information so that auto-aligned runs are now pretended to have been acquired using the same scanner-space slice prescription. The cleanest way to achieve that would to, as the very first step of preprocessing, apply the inverse of the auto-align matrix. Right now this is only found in the dicom that often gets discarded after conversion to nifti. Ideally, nifti would preserve that information but that might be too big of a boat to steer. A new key:value pair in the JSON file for the auto-aligned matrix (and maybe also for the original, non-auto-aligned slice prescription) seems the cleanest and most straightforward to me.
I'm not sure how frequently people use auto-align for very limited fov data, but I have been for a few years now and still struggling.
Alternatives for the future
For now, I'll dig the auto-align matrix out of the dicom, but I hope to get it from the JSON in the future. If auto-align and variants become more of a thing, a flag in dcm2niix allowing the user to choose whether the nifti header gets the original or auto-aligned slice prescription would be awesome.
Thanks a lot for your attention and
Keep up the good work!
Sébastien
Beta Was this translation helpful? Give feedback.
All reactions