How can export features from 3D dicom

129 views
Skip to first unread message

biobob

unread,
Sep 12, 2019, 4:20:12 PM9/12/19
to pyradiomics
HI!!  I would like to extract radiomic feature using pyadomic on 3d dicom. I have a segmentation but is in volume with different dimension. How can approach the problem?

Joost van Griethuysen

unread,
Sep 13, 2019, 1:47:30 AM9/13/19
to pyradiomics
Hello,

Depends on how you want to approach the problem, how comfortable you are with working with programs on the commandline, etc.

PyRadiomics requires both the image and mask volume to be contained within single, SimpleITK-readable, files. For DICOM input, this requires additional pre-processing if the volume is 3D, with 1 file per slice.

Basically, you have 2 main options:

- Use 3D Slicer with the SlicerRadiomics extension. The advantage is that Slicer provides you with a nice user interface, and is able to handle DICOM input without additional programs. However, Slicer's workflow is aimed at single case-processing, so processing a batch of cases is a bit more of a hassle.
- Convert the DICOM volumes to a format readable by PyRadiomics, like NRRD. See also this FAQ in the PyRadiomics documentation. You can then use PyRadiomics from the commandline to process your batch. See the Usage section in the documentation for more details.

Regards,

Joost

Op donderdag 12 september 2019 22:20:12 UTC+2 schreef biobob:

Joost van Griethuysen

unread,
Sep 13, 2019, 1:54:06 AM9/13/19
to pyradiomics
With regard to your segmentation: 

You can extract features so long as the bounding box of the ROI in the mask file is contained within the physical bounds of the image volume. You do need to enable mask resampling (correctMask=True) if you don't enable resampling of the image.
This allows PyRadiomics to resample the mask to the image geometry, so the matrices match up. This is not enabled by default to ensure users know what they are doing and don't accidentally use the wrong masks for the wrong image.

Regards,

Joost

Op vrijdag 13 september 2019 07:47:30 UTC+2 schreef Joost van Griethuysen:

Andrey Fedorov

unread,
Sep 13, 2019, 9:40:47 AM9/13/19
to pyradiomics, Joost van Griethuysen

To add to the excellent suggestions from Joost, as the first step, I would also recommend you try loading both the image and segmentation into 3D Slicer, and to make sure the segmentation lines up with whatever structure it corresponds to in the image. If segmentation and the structure in the image do not line up, you will not be able to do meaningful analysis.

--
You received this message because you are subscribed to the Google Groups "pyradiomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyradiomics...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyradiomics/771f4d2c-d858-466a-a080-08647a6ac7e0%40googlegroups.com.

MMS

unread,
Sep 13, 2019, 12:39:08 PM9/13/19
to pyradiomics
I used the 3DSlicer to segment my images and, when first using the "Editor" at 3DSlicer to perform Segmentation, this would automatically activate the "Rotate to Volume Plane" (one of the display option) and "adjust" my original image. With this activation, the image and the segmentation were aligned with each other.
However, if afterwards I load the image and the label I created into Slicer, these only become perfectly aligned as in the previous step if I activate the "Rotate to Volume Plane".
I tried the same in another software (ITK Snap) and it does not need any previous step to present both the image and segmentation perfectly aligned.

I wonder if pyRadiomics is aware of this necessity of "rotation to volume plane" when performing the feature extraction?
P.S.: I am using the radiomics.imageoperations.checkMask.

Thank you

To unsubscribe from this group and stop receiving emails from it, send an email to pyrad...@googlegroups.com.

Andrey Fedorov

unread,
Sep 13, 2019, 12:44:57 PM9/13/19
to MMS, pyradiomics

"rotation to volume plane" is a visualization feature. It does not change how voxel data is represented in memory or in files.

 

You should think about “rotate to volume” similar to changing position of camera in 3d space. You are changing to position of a plane slicing through a volumetric dataset, and see the data that this plane is intersecting, but it does nothing to change the 3d dataset itself.

To unsubscribe from this group and stop receiving emails from it, send an email to pyradiomics...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyradiomics/76609c7a-0fcd-40dc-bb04-03dae668ee8f%40googlegroups.com.

biobob

unread,
Sep 18, 2019, 4:20:16 AM9/18/19
to pyradiomics
Thanks so much for the help and suggestions..
I want to use pyradiomics from script and I working on trasform dicom in nrrd. I have this problems:
 - I have a T1 256x256x180 and the segmentation is 772x338x1 How can register the image? How to do this task?
- how to normalize from different machine?

Joost van Griethuysen

unread,
Sep 18, 2019, 8:08:23 AM9/18/19
to pyradiomics
As to 'registering the image', see the earlier suggestions in this topic. If the segmentation nicely aligns with the lesion in the volume, you only have to enable mask correction.
As to normalization, PyRadiomics allows for normalizing the image intensities as part of the preprocessing. How to do this is detailed in the documentation (section on customization). Please note that this off course does not yield a perfect correction/negation of inter-scanner noise. Assessing and dealing with different sources of noise in your radiomics 'signal' should be an integral part of the analysis.

Regards,

Joost

Op woensdag 18 september 2019 10:20:16 UTC+2 schreef biobob:
Reply all
Reply to author
Forward
0 new messages