Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Ecat2Nii] Only apply ECAT_CALIBRATION_FACTOR if it has not already b… (
#268) * [Ecat2Nii] Only apply ECAT_CALIBRATION_FACTOR if it has not been applied; check CALIBRATION_UNITS to see if calibration has been applied, if it has, return input image, otherwise multiply by calibration factor. !!!!!!!!IMPORTANT NOTE!!!!!!!!!!! CALIBRATION_UNITS=1 -> Multiply the image by the ECAT_CALIBRATION_FACTOR. CALIBRATION_UNITS=0 -> Do not multiply the image by the ECAT_CALIBRATION_FACTOR. This change will correctly account for whether the calibration factor has already been applied to Ecat data. In the current version of PET2BIDS, ecat2nii will erroneously reapply the calibration factor on data that has already been calibrated, resulting in Nifti files with incorrect data objects. Remove extra scaling applied again via nifti `scl_slope`, this was the precipitating error that led to the discovery of the above. Thank you to @noahg-neuroimage for discovering and creating this PR to fix. --------- Co-authored-by: Anthony Galassi <28850131+bendhouseart@users.noreply.github.com>
- Loading branch information