-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Issue casting Philips NIfTI images to short (16-bit) type #6
Comments
Not sure if relevant, but I had a similar issue. Though the original issue was using another pipeline, I found similar fixes worked for ASHS. Steps to fix:
ASHS will run like normal. I did not notice any peculiarities with the ASHS output on non-short data. |
Thanks @ajschadler12, that's enlightening! FYI, the workaround I used for mitigating the issue was to 'revert' the application of the Philips scaling slope (which is unnecessary for running ASHS). That is, divide the image scaled values by its final slope value before feeding it to the ASHS pipeline. |
Ah, thank you for mentioning that. I will be presenting data processed using the modifications I mentioned at a conference soon. I will need to keep that in mind when we move forward with publishing!
I had two questions:
|
# FIX: undo Philips scaling factor applied by dcm2niix to the input images
# before they go into the pipeline to avoid further inconsistencies when
# having data casted to 'short' type by ASHS.
SLOPE=$(fslval ${T1_NII_IMG} scl_slope)
CMD="fslmaths ${T1_NII_IMG} -div ${SLOPE} ${T1_NII_IMG}"
echo "[info] CMD: "$CMD; $CMD
|
One of the early ASHS steps (
ashs_template_qsub.sh
) casts both MPRAGE and TSE images to 'short' data type, see ashs_template_qsub.sh#L62 and ashs_template_qsub.sh#L112.Our MRI data was acquired in a Philips scanner, vendor known for the complexity to deal with its scaling transformations (see here). Thus, my

dcm2niix
-converted NIfTIs include a high scaling slope value (multiplicative factor applied to the image stored values) which leads to large ranges of intensities once applied to image data. This Philips eventuality combined with the aforementioned casting transformation applied by ASHS, leads in some cases to bad registration and segmentation results.Example of
c3d $IN_IMG -type short -o $OUT_IMG
casting results,I found someone here posting a similar issue and the solution proposed was using ANTS to transform the image intensities to a given range (0-1000) before running ASHS.
In addition, the
ashs_template_qsub.sh
script has a commented line suggesting to apply a linear transformation of the intensities withc3d
itself to 0-4096 but that was somehow discarded do to some further troubles with old atlases. See,What approach would you primarily recommend to mitigate/fix that issue and be able to run ASHS normally on those images?
Thanks in advance,
Jordi
The text was updated successfully, but these errors were encountered: