[Insight-users] Loading DICOM RTStructs

Charles Wang cywang926 at gmail.com
Fri Oct 16 20:39:01 EDT 2009


Hi Jason,
 It is glad to hear of your implementation of DICOM RT structure sets importer.
It seems that to store each structure in individual  binary volume is
the only solution so far, although it costs much disk space.
Each RT structure may intersect one another which makes it difficult
to use one ITK label image volume to handle all these structures. ( I
ever tried to store each structure as one bit of  index in label image
to overcome the problem of one pixel having more than label index, but
it is not compatible with ITK image pipeline directly) That's why CERR
stores each structure as raster segment compressed by RLE.
There seems to be a shift in Y axis for the  coordiante of RTOG file(
exported from Pinnacle TPS) compared to that of DICOM-RT file ( also
from Pinnacle TPS , using the same plan) even after considering
coordiante transformation between DICOM and RTOG.
Do you encounter this problem in your RTOG file parser ?

Congratulation to your excellent work, hope to see your contribution
in Insight Journal soon.
Best regards,
   Charles Wang

2009/10/17  <Jason.Dowling at csiro.au>:
> Hi Mark,
>
> No I don't use an itk mesh.  I needed a binary volume for each structure  (you can then mesh your binary volume if you want).  In the DICOM RT file each each structure is represented as a set of points for a single slice (nb there might be > 1 sets of points for a single contour in a single slice, eg for bone).   I work on  a  temporary 2D slice which is inserted back into the 3D volume after it's updated.   I use some of Mathieu's code from the excellent GDCM 2.0 library  to extract the RT points.   For each structure region , I  convert the physical RT points into image space and generate pointlist,  which are used to generate  polygon spatial objects for each contour .  Then I use the SpatialObjectToImageFilterType to copy that structure component onto the 2D slice.  And iterate through the RT file:  at the end of I have one binary volume for each structure.
>
> If anyone's interested, last year I also wrote an itk RTOG file parser which does a similar thing.
>
> I've sent the code and test data to you - please let me know if you have any feedback?
>
> Cheers,
> Jason
>
> ________________________________________
> From: Mark Roden [mmroden at gmail.com]
> Sent: Saturday, 17 October 2009 1:54 AM
> To: Dowling, Jason (ICT Centre, Herston - RBWH)
> Cc: mathieu.malaterre at gmail.com; insight-users at itk.org; gdcm-developers at lists.sourceforge.net
> Subject: Re: [Insight-users] Loading DICOM RTStructs
>
> Hi Jason,
>
> That would be very useful, thanks.
>
> My code, as I said, is written using the C# wrappers to gdcm.  It then
> converts the masks into a char image, where a 1 indicates the presence
> of a mask and a 0 does not, and I was going to implement a marching
> squares algorithm to go back to an rtstruct.  I'm guessing that your
> code goes to an itk mesh; is there a way to convert a mesh into an
> image and back again?  I'm messing around with segmentations, and the
> papers I'm finding are all pixel-based rather than mesh-based, so
> getting the mesh is just part of the problem.
>
> Thanks!
> Mark
>
> On Fri, Oct 16, 2009 at 12:27 AM,  <Jason.Dowling at csiro.au> wrote:
>> Hi Mathieu and Mark,
>>
>> Yes, I've written a C++ DICOM-RT Struct importer which uses ITK and GDCM 2. I've been testing it on MR and CT volumes of the pelvis (I have also testing it on some head and neck and chest volumes) over the past few weeks.
>> I have been planning to write an Insight Journal paper over the past week and will try to do this over the weekend.  I'm happy to send you the code today (as is) if you would like to test/compare it?
>>
>> Cheers,
>> Jason
>>
>>
>> -----Original Message-----
>> From: Mathieu Malaterre [mailto:mathieu.malaterre at gmail.com]
>> Sent: Friday, October 16, 2009 6:13 PM
>> To: Mark Roden
>> Cc: insight-users at itk.org; Dowling, Jason (ICT Centre, Herston - RBWH); gdcm-developers
>> Subject: Re: [Insight-users] Loading DICOM RTStructs
>>
>> Hi Mark,
>>
>>  I made a mistake and had a private conversation with Jason Dowling (CC), without CCing gdcm-dev sorry :(
>>  He also has been working on a C++ RT Importer using gdcm 2.x. This has been tested on multilpe platform and gives proper results.
>>  If you would like we could compare both C++ code and merge them. I know Jason was really close to making a release to the IJ. Jason, any comments ?
>>
>> cheers
>>
>> On Fri, Oct 16, 2009 at 1:43 AM, Mark Roden <mmroden at gmail.com> wrote:
>>> Hi all,
>>>
>>> I note that there is now the capability of exporting DICOM RT structs:
>>>
>>> http://www.insight-journal.org/browse/publication/316
>>>
>>> However, I can't find any information on how to import these structs.
>>> It may just be that my google-fu is weak, so if there is such an
>>> example or the like, please let me know.
>>>
>>> I've written C# code to wrap around gdcm to go into my own image
>>> format, so I can use that if I have to, but the conversion would
>>> probably be irritating since I'm extremely inexperienced with the itk.
>>>  I'd rather follow some sample code.
>>>
>>> Barring that, should I just post my importer to the development list
>>> to get some help on converting it into an itk C++ class?
>>>
>>> Thanks!
>>> Mark
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
>>
>> --
>> Mathieu
>>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list