oldmin/oldmax aren't handled properly #582
Labels
area:IO
Issues affecting the IO module
Good first issue
A good issue for community members new to contributing
type:Enhancement
Improvement of existing methods or implementation
Milestone
Description
cc: @jcfr @lassoan @pieper
Nifti1 has scl_slope and scl_inter. The equivalent attributes in the NRRD are oldmin and oldmax as if:
(you can also look at this commit by Chris Rorden)
Actual behavior
However, after I defined old min and old max in the NRRD header, the data reported in Slicer aren't scaled. The difference becomes stark when you load both NIFTI and NRRD image in Slicer. NIFTI voxels are scaled while NRRD aren't. On the other hand, fslview, NIBABEL both report the data after scaling.
Expected behavior
So, we should report NRRD data after scaling them as follows:
find scl_slope and scl_inter from above and
scaled_data= unscaled_data*scl_slope+ scl_inter
Additional Information
Work with the following public data: the T1_echo*.nii.gz have scaling present in the NIFTI.
http://people.cas.sc.edu/rorden/SW/dcm2niix/odd/multiechotest_Philips_Vanderbilt.zip
dcm2niix should do the DICOM-->NIFTI conversion for you. Then you can use conversion repository to convert NIFTI-->NHDR
The text was updated successfully, but these errors were encountered: