Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XA61A dicom-enhanced 3-planes localizer stacked in a single volume. #894

Closed
bpinsard opened this issue Nov 26, 2024 · 7 comments
Closed

Comments

@bpinsard
Copy link
Contributor

Describe the bug

3-planes/3-orientation localizer from XA61A are stacked in a single volume.

see nipy/nibabel#1392

To reproduce

dcm2niix -o ./ -d 0 -v 2 ../dicoms/mtl/MRe.1.3.12.2.1107.5.2.63.213014.2024111513211206927679828

Expected behavior

multi-frame enhanced dicoms with non-matching orientation should result in multiple niftis with appropriate affines.

Output log

image
(cropping face for "defacing")

Version

Chris Rorden's dcm2niiX version v1.0.20240731 (JP2:OpenJPEG) (JP-LS:CharLS) GCC11.4.0 x86-64 (64-bit Linux)

@bpinsard
Copy link
Contributor Author

I will try to get phantom data from that site to be shareable.

@neurolabusc
Copy link
Collaborator

@bpinsard I can not provide any insights without seeing data. However, here are two thoughts:

  1. I would test the latest commit to the dcm2niix development brnach (v1.0.20241127) which adds several kludges for XA61 data.
  2. I always run dcm2niix with the ignore derived and localizer flag (-i y). Localizers are typically only used for planning and derived data are typically of lower quality than what can be achieved with offline tools. I would have thought that would skip this series entirely.

@neurolabusc
Copy link
Collaborator

As noted here is a limitation of the DICOM data, not dcm2niix. dcm2niix does warn that slice orientation varies, and dcm2niix will ignore these localizer images if the user chooses the -i y option.

@neurolabusc
Copy link
Collaborator

Previously, dcm2niix generated a warning that the slice orientation varied but would still generate a NIfTI image. I have updated this to an error. While a legal DICOM series can have multiple slice orientations, NIfTI requires that all slices in a file have the same orientation. Therefore, dcm2niix will fail to convert any enhanced DICOMs with variable slice orientation. In practice this should not influence conversions, as these series are localizers that should be discarded.

Error: DICOM incompatible with NIfTI slice orientation varies (issue 894, localizer?) [0 1 0 0 0 -1] != [1 0 0 0 0 -1]

@bpinsard
Copy link
Contributor Author

bpinsard commented Dec 9, 2024

Thanks for the update!
Just to better understand: would splitting a single dicom with multiple stacks (provided that they are properly formatted with separate StackID) into separate niftis require a major refactor of dcm2niix?
If one develops a sequence with multiple "concurrent" FoV that gets packed into a single dicom, for now dcm2niix won't be able to convert these. The only example I have in mind is this https://onlinelibrary.wiley.com/doi/full/10.1002/mrm.25143 that I have seen used for simultaneous brain and spine BOLD. Pretty niche of course and I don't think this is ported to XA.

@neurolabusc
Copy link
Collaborator

In general, dcm2niix tries to convert each DICOM series into an individual NIfTI file (though there are exceptions: multi-echo files are parsed into separate NIfTI files). However, NIfTI requires that all slices in a file are co-planar, which is not the case for localizer images. Therefore, a localizer with sagittal, coronal and axial slices in a single series would need to be saved as three separate NIfTI images. Localizer scans are by design quick and dirty - they often show T1 effects where the orthogonal slices were acquired and have fast but poor shimming. I actually think this is really useful for planning scans, as the localizers alert you to problems for subsequent scans. However, due to their artifacts, I always discard localizers (using -i y). As you note, I think the use case is very niche. If a team wants to support these images, they can fork dcm2niix and contribute a pull request if they want to share their modifications.

@mharms
Copy link
Collaborator

mharms commented Dec 9, 2024

If attempting to split multi-plane localizers into distinct volumes/NIFTIs is too complicated, or simply out of scope, I'd like to put in a plug for then just keeping things as they were. I'd rather have the localizers continue to convert, perhaps with two different orientations bundled into the same NIFTI, rather than not get any NIFTI from the localizers at all. That is because reviewing the localizers occasionally has some value, such as if you want to visualize where the brain was landmarked (i.e., where in the brain corresponds to IsoCenter), which is easy to see in the localizers due to the T1 effect showing the location of the slices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants