I am trying to convert Dicom files to Nifti. But after conversion, I see a huge change in intensity (2nd image). I have also tried SimpleITK library bias correction. But the outcomes are the same.
Would anyone explain why it happened and how to fix this?
DICOM files can contain window/level information to indicated how they should be displayed, but nii files do not have that, so viewers just guess how best to display. Try different window/level settings to confirm that the data was transferred correcty.
I have tried to apply the same windowing and leveling using sitk while converting DICOM to NIFTI. But still, it doesn’t look the same. Any idea what would be the best conversion method to keep the visual information intact?
@Shovon_Ahmed have you tried converting your DICOMs to NIfTI and loading the resulting NIfTI allows you apply the original window values? This would help you trouble shoot at what stage the problem is occurring. My first thought might be to make sure that the DICOM Rescale intercept, (0028,1052), and rescale slope (0028,1053) have been correctly converted to the NIfTI scl_inter and scl_slope fields.
Thanks for the heads up on that @Chris_Rorden - perhaps we should add support for these cal_min/max fields in our nifti readers and writers. It wouldn’t be a hard task if someone wants to take it on.