tomaroberts / nii2dcm

nii2dcm: NIfTI to DICOM creation with Python
Other
56 stars 14 forks source link

Outputs not in .dcm? #5

Closed junxiant closed 1 year ago

junxiant commented 1 year ago

Hello,

I am trying to convert .nii files into dicoms file and i ran the code using

nii2dcm {path_to_.nii} {output_dir} 

But the output files in the output_dir are not in .dcm format/with no .dcm extensions

eg. image

tomaroberts commented 1 year ago

@junxiant

Apologies for the slow reply!

Those should in fact be DICOM files, but the .dcm extension is missing. You can confirm by opening them in a tool such as ITK Snap, 3D Slicer, etc. Alternatively, you could use PyDicom or DCMTK and examine the headers of the files to confirm.

junxiant commented 1 year ago

Ah then the quick fix would be to just add the .dcm extension in the code too, thanks

tomaroberts commented 1 year ago

@junxiant – it's quite common in medical imaging software for the .dcm suffix to be omitted. But I agree, it would be good to have an option to save with/without the suffix.

Thanks for raising (and closing) issue :)