Help with images *.nrrd

110 views
Skip to first unread message

Tony Alexandre Medeiros

unread,
Nov 13, 2019, 1:14:51 PM11/13/19
to pyrad...@googlegroups.com
Hi, I have a dicom image set of a magnetic resonance sequence and the mask image set. I am using 3D Slicer to generate their * .nrrd images (volume and segmented). However, when I run pyradiomics, it does not generate features. Are there any steps I need to do, to get more attention?
Thank you for your help.

Tony Alexandre Medeiros
Doutorando em Engenharia Biomédica -  PPGEA/UnB
Mestre em Engenharia Elétrica - PPGEE/UFU

Bacharel em Ciência da Computação - DCC/UNITRI

Joost van Griethuysen

unread,
Nov 14, 2019, 3:59:21 AM11/14/19
to pyradiomics
Is there a warning or error message? Can you share some additional information? Preferably the PyRadiomics log (see documentation on how to enable it), but also any kind of customization you apply.

Op woensdag 13 november 2019 19:14:51 UTC+1 schreef Tony Alexandre Medeiros:

Tony Alexandre Medeiros

unread,
Nov 15, 2019, 9:15:25 AM11/15/19
to pyradiomics
Dr. Joost, 
The execution has no error.
What happens is as follows:
I import dicom images into 3DSlicer and save them as nrrd. I do this for images that represent volumes and I do this for images that represent masks. 3DSlicer generates the nrrd OK images.
When I open the generated nrrd images, 3DSlicer gives the option to say that the images generated for volumes are volumes and the generated images of masks are segments.
But when viewing the mask images by choosing the segmented option 3DSlicer does not display any images. But if I choose the volume option, 3DSlicer shows the segmentation correctly.
I think here is the difficulty I am having.
because when I run pyradiomics, and I choose the volume image and the segmentation image, it shows nothing. I suppose it's because the targeting image (of the masks) didn't generate the region of interest.

Thanks again for your attention and help.

Joost van Griethuysen

unread,
Nov 15, 2019, 9:48:19 AM11/15/19
to pyradiomics
Can you share the (anonymized) nrrd files for one such case?
Regards,

Joost

Op vrijdag 15 november 2019 15:15:25 UTC+1 schreef Tony Alexandre Medeiros:

Tony Alexandre Medeiros

unread,
Nov 15, 2019, 10:02:25 AM11/15/19
to pyradiomics
Yes, no problems.
thanks.
Image_Vol.nrrd
Mask_Tumor.nrrd

Joost van Griethuysen

unread,
Nov 15, 2019, 10:48:14 AM11/15/19
to pyradiomics
The issue is in your geometric information.

Both image and mask have size (xyz) (260x320x24), and in-plane spacing of 0.6875x0.6875. However, the mask has slice thickness 1 (vs 6.5 for the image), and the origin is (0, 0, 0) (vs. (83.3, 115.8, -61.45).
Most likely this is due to some conversion issue somewhere. How did you create/convert the mask?

I was able to get the mask over the image by copying the information:

import SimpleITK as sitk
im = sitk.ReadImage('Image_Vol.nrrd')
ma = sitk.ReadImage('Mask_Tumor.nrrd')
ma.CopyInformation(im)
sitk.WriteImage(ma, 'mask.nrrd', True)


Regards,

Joost

Op vrijdag 15 november 2019 16:02:25 UTC+1 schreef Tony Alexandre Medeiros:

Tony Alexandre Medeiros

unread,
Nov 15, 2019, 3:12:01 PM11/15/19
to pyradiomics
Thanks for the answer.
I created the mask in 3DSlicer. I imported the dicom images and saved in the nrrd pattern.

Regards.
Reply all
Reply to author
Forward
0 new messages