segmentation masks to RT struct

43 views
Skip to first unread message

Michael Lempart

unread,
Dec 10, 2020, 7:06:32 PM12/10/20
to Plastimatch
Hi all,

Iam trying to convert segmentation masks to RT struct DICOM files, where pixel (or voxel) values ca be 0 (background), 1 (segmentation 1), 2 (segmentation 2) or 3(segmentation 3).

It works just fine with a single structure, but if I try to convert all three masks to a common RT struct file, one structure (3) is missing, though it seems like plastimatch combines mask 2 and 3.

Does anyone have had this kind of issue?

Thanks in advance,

Cheers,

Mike

tim.birtwhistle

unread,
Dec 11, 2020, 2:58:35 AM12/11/20
to plast...@googlegroups.com
Hi Mike, 

I found something similar to this. I think the DICOM converter is expecting the mask values to be powers of two so it thinks segmentation 3 is a combination of 1 and 2. This is useful when the structures might overlap. One way around this would be to change the pixel values of the mask if you can. If segmentation 3 had the value 4 it should work.

You might need to alter your list file too if the structure labels don't agree with what you expect but that might not be necessary. 

Thanks, 
Tim

--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/7dc912b2-d9b5-418e-82f2-a8b5340fd393n%40googlegroups.com.

Michael Lempart

unread,
Dec 11, 2020, 2:46:14 PM12/11/20
to plast...@googlegroups.com
Hi Tim and thanks for your reply!

I will give it a try and I think you might be right. I observed that one structure in the RT struct dcm seems to be a combination of two of the masks. 

Regards,

Michael 

Sharp, Gregory C.

unread,
Dec 11, 2020, 2:55:33 PM12/11/20
to plast...@googlegroups.com

Hi Michael,

 

The --output-ss-img option does indeed use a separate bit for each structure as Tim says.  This allows overlapping structures.

 

To do what you want, you should use --output-labelmap.  This does not support overlapping structures, and gives you the contours as 1, 2, 3, etc.

 

Greg

 

From: 'Michael Lempart' via Plastimatch <plast...@googlegroups.com>
Sent: Friday, December 11, 2020 2:46 PM
To: plast...@googlegroups.com
Subject: Re: [Plastimatch] segmentation masks to RT struct

 

        External Email - Use Caution        

The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at http://www.massgeneralbrigham.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Reply all
Reply to author
Forward
0 new messages