0
votes

I am trying to convert a series of MRI DICOM images (.dcm) into .nnrd format. I found this guide for doing it in 3D slicer and I managed to do it. The problem is that the new nrrd image that is created has lost the pixel spacing of the original DICOM image.

In the additional settings, while converting the image, I also unticked the "Compress" box but the problem is still there. For instance, checking the two images (original .dcm and new .nrrd) in Imagej I get this:

The two images (nrrd on the left and dcm on the right) where I highlighted the old and the new pixel spacing

Anyone knows how to solve this? Any other alternative (that preserves the pixel spacing) is well accepted.

Thanks a lot in advance, Tommaso

1
You may have better luck asking them directly embodi3d.com/forums/forum/22-3d-slicernicolallias
Ok, I'll do that. Thanks @nicolalliasTommaso Di Noto
3D Slicer normally doesn't have problems with such conversions. Can you share the images? Three consequent slices should be enough. If it is not possible, please check in Slicer's Modules (Fig. 9 from your link) -> Volumes -> Volume Information -> Image Spacing.Bartłomiej
Hi @Bartłomiej! I only have a single slice, because I just extracted the most significant slice for each patient (the one slice where the lesion was most evident). Anyway, here it is one anonymized image: mega.nz/#!gPhHRayB!JTen715bznaNqNxIzNKez_Wutb0M5RIZv1vS0_tg9BQTommaso Di Noto

1 Answers

1
votes

Your DICOM file is corrupted. Some mandatory tags are missing (e.g. 20,37, Image Orientation (Patient)). Therefore Slicer cannot properly compute the spacing. It even shows you in "Dicom Browser" window the following warning (after clicking Examine button): "Reference image in series does not contain geometry information. Please use caution".

If you cannot fix original images, you can apply manually all required spacing elements. Either do it in Slicer before exporting (Module Volumes -> Volume Information), or you can fix nrrd files themselves. Open them in your favorite text editor:

NRRD0004
# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: short
dimension: 3
space: left-posterior-superior
sizes: 512 512 1
space directions: (1,0,0) (0,1,0) (0,0,1)
kinds: domain domain domain
endian: little
encoding: gzip
space origin: (0,0,0)

You have to update this line:

space directions: (0.507812,0,0) (0,0.507812,0) (0,0,4)

The true spacing are under tags 0028,0030 (X and Y) and 0018,0050 (Z).