SlicerRt / SlicerRT

Open-source toolkit for radiation therapy research, an extension of 3D Slicer. Features include DICOM-RT import/export, dose volume histogram, dose accumulation, external beam planning (TPS), structure comparison and morphology, isodose line/surface generation, etc.
https://slicerrt.org
127 stars 60 forks source link

Distinguish two ROIs with same Name but different Number. #110

Closed GiulioBen closed 5 years ago

GiulioBen commented 5 years ago

Dear all, i have a problem that i'm not able to solve by myself.

I want to import a RT Structure containing 2 different ROI with the same (3006,0026)ROIName = "Lesion01" but with a different (3006,0022)ROINumber = {1, 2}.

When I import it I'm no more able to distinguish them, neither in the Data nor in the Segmentation module. The Name is the same, the Number is not reported at all.

I've tried to understand if the first one always has ROINumber = 1 whereas the second one is the ROINumber=2 but I can't find the block of code.

Can someone help me to distinguish the two segments? Thank you!!

Screenshot 2019-07-08 at 15 23 45
cpinter commented 5 years ago

Interesting problem indeed.

What I'd do is I'd set the ROINumber as a tag to the segment. Then if you hover the segment in the Data module then the ROINumber will be included in the tooltip.

It's only one line of code. I can do it for you today or tomorrow if you'd like.

GiulioBen commented 5 years ago

It's my first approach to Slicer and Python, but I've already coded in C++ or vb. Indeed I was looking for a way to concatenate ROINumber + "-" + ROIName in the segmentation name, but maybe the tag is a smarter way.

I'd really appreciate your help, maybe I'll also learn hot to use Slicer! Best.

cpinter commented 5 years ago

I implemented the change, it is supposed to be available in tomorrow's Slicer preview version. It was more than a line of code doing it right, but it took only a few minutes :)

This is how the ROI number appears: image

I hope this is fine.

GiulioBen commented 5 years ago

Thank you master. Tomorrow I'll let you know if it works!

Best

GiulioBen commented 5 years ago

Works like a charm!!

Thank you boss!