"Label (1) is not present in the mask"

784 views
Skip to first unread message

thibaut...@gmail.com

unread,
Nov 15, 2017, 5:08:12 AM11/15/17
to pyradiomics

Hello,


I’m an informatics master student in a traineeship in a medical imaging department.


My master thesis is about Radiomics and I would like to use PyRadiomics on DICOM PET-CT image series from the hospital PACS.


I already use the "LIFEx" software ( http://www.lifexsoft.org/ ) to automatically generate a region of interest with PET images. This ROI is auto-generated in Nifti format.

Unfortunately I have some trouble using it with PyRadiomics.


I was confronted, at first, with the error

« Inputs do not occupy the same physical space »

that I have bypassed via the following approach:

  • ·         saving PET images and ROI in MHD format
  •        Correction of the Offset and the Element Spacing: copy of the PET images values in the header of the ROI
  •        Saving PET images and ROI in NRRD format
  • ·         Copy and paste the PET images space origin in the header of the ROI because the values ​​are almost the same but their differences exceed the 4.0*10^-6 tolerance

All format conversion was done via 3D slicer software ( https://www.slicer.org/ )


From there I no longer have the error regarding the "same physical space" but PyRadiomics tells me that 

« Label (1) not present in the mask »


What does it means ? How do I have to change my ROI to be able to use PyRadiomics with these auto-generated ROIs and the Dicom PET and CT images at my disposal?


Thanks in advance,


Thibaut.

Joost van Griethuysen

unread,
Nov 15, 2017, 5:21:51 AM11/15/17
to pyradiomics
Hello Thibaut,

The last error message you are getting means that there are no voxel in your mask which are set to value 1, i.e. that there is no ROI with label 1 in the mask file. It is possible that the automatically generated ROI assigns a different value to indicate the tumor ROI.
You can check this by loading the mask in slicer and checking the value of the label. Did you visually check that the image and mask still match (when loaded in e.g. slicer). We find that sometimes conversions behave strangely and corrupt our input files.

You can instruct PyRadiomics to use this different value in multiple ways (higher ranked methods override lower ranked methods):
  - Provide it in an additonal column "Label" in the input CSV file (N.B. only applies to batch processing: "pyradiomicsbatch" command line)
  - Provide it as an optional command line argument ("--label" or "-l")
  - Provide it in the parameter file (as "setting" "label")

Regards,

Joost van Griethuysen

Op woensdag 15 november 2017 11:08:12 UTC+1 schreef thibaut...@gmail.com:

Joost van Griethuysen

unread,
Nov 15, 2017, 5:25:23 AM11/15/17
to pyradiomics
Additionally, what version of PyRadiomics are you using? If I remember correctly, the error "Inputs do not occupy the same physical space" should be caught and replaced by a more insightful responsein the latest version of PyRadiomics.

Op woensdag 15 november 2017 11:21:51 UTC+1 schreef Joost van Griethuysen:

Joost van Griethuysen

unread,
Nov 15, 2017, 5:56:25 AM11/15/17
to pyradiomics
I discovered a bug that occurred when using python 3. In that case, the error you got was not correctly handled. It is fixed in the current master of PyRadiomics.
Additionally, you can try to set the geometry tolerance, possibly removing the need for all the conversions. see here and here for more details.

Op woensdag 15 november 2017 11:25:23 UTC+1 schreef Joost van Griethuysen:
Reply all
Reply to author
Forward
0 new messages