[Insight-users] Problem in copying DICOM image: Study instance UID value is changed

Subrahmanyam Gorthi subrahmanyam.gorthi at gmail.com
Wed Jul 2 15:44:08 EDT 2008


Dear Mathieu,

Thank you very much for your reply.

>> Is this integrated with any of the Mesh and/or the Meta Object in ITK too
?

Currently, at the end of my segmentation in ITK, I have ROIs in mask format.
I still have to work on converting this mask to a polygon so that in can be
written to a ROI module.
Because of my little exposure to ITK, I am not aware whether this conversion
involves Mesh or Meta Objects.

I am facing problem while calling the KeepOriginalUIDOn ().
A runtime exception is thrown when the above function is called.
I am afraid there is some error in the way I am using the ImageFileWriter,
since the error is occurring while updating the writer.
To reproduce the problem, I have created a sample code.
Please find attached the .cxx & the associated CMakeLists.txt files.
Can you please help me?

Thank you for the details on the possible pipeline for the RTSTRUCT, which
is more flexible and general.
I will give a try part by part.

Many thanks for your help.

Warm Regards,
Subrahmanyam Gorthi

EPFL-STI-LTS5
Station 11
CH - 1015 Lausanne
Switzerland






On Wed, Jul 2, 2008 at 12:03 PM, Mathieu Malaterre <
mathieu.malaterre at gmail.com> wrote:

> Subrahmanyam,
>
> On Wed, Jul 2, 2008 at 11:30 AM, Subrahmanyam Gorthi
> <subrahmanyam.gorthi at gmail.com> wrote:
> > Dear Mathieu,
> >
> > Many THANKS for your detailed & prompt reply.
> >
> > Here is what I am actually trying to implement in ITK:
> >
> > Using a segmentation algorithm in ITK, I obtained the coordinates for 3-D
> > ROI of a patient's image .
> > I am now trying to export these results into a "DICOM-RT Structure-Set"
> > file, for RT-Planning in IMRT.
>
> *Very* cool ! Is this integrated with any of the Mesh and/or the Meta
> Object in ITK too ?
>
> > In addition to ROI module, as the DICOM-RT structure-set file has to
> contain
> > other
> > mandatory modules like patient-module, study module etc.,
> > I am trying to selectively copy those modules from the associated
> patient's
> > 3-D CT image.
>
> Ah, I see why the UID can remains the same here. You did not modify the
> image :)
>
> > I compared the tags of structure-set file that I am creating in ITK with
> > the  file generated by another software that
> > a Physician here is using in his hospital;
> > he was manually drawing the contours on the CT image and the
> corresponding
> > DICOM-RT structure-set file is generated by the software.
>
> ok
>
> > I observed that for the "structure-set" file generated by that software,
> > "study-instance UID" tag is same as that of the
> > other 3-D CT DICOM images and hence, I am trying to do the same for the
> file
> > created through ITK.
>
> Yup, in this very special case, then you are even encouraged to keep
> the same UID :)
>
> > From your reply, I understand the importance safety issues in  changing
> the
> > default behavior.
> > I would like to know:
> > 1. Is it possible to change the default behavior for ONLY selected UIDs
> that
> > are specified by the user?, and how?
>
> I am not sure I understand that. but I guess you can do the in your
> code (application level):
>
>  if( currentuid match [set of known uids] )
>    GDCMImageIO->KeepOriginalUIDOn ()
>
> > 2. I want to finally contribute this code to ITK.
>
> Even better !
>
> > It would be very happy to know and most probably, implement any better
> ways
> > or modifications to the current approach.
> > Your suggestions in this regard will be of great help to me.
>
> IMHO ITK is clearly lacking support for RTSTRUCT object, so any kind
> of contribution would be AFAIK very welcome. For instance in a newer
> release of GDCM, we have now integrated RTSTRUCT object nicely in VTK:
>
> See:
>  http://gdcm.sourceforge.net/html/classvtkGDCMPolyDataReader.html
>
> Thus RTSTRUCT now appears as a set of vtkPolyData which is the base
> object for 2D unstructred data in VTK.
> I would think that a similar approach can (should?) be taken for ITK.
> You would need to implement a itk::somethingIO that will read RTSTRUCT
> and then convert it to either a itk::Mesh/itkQEMesh or SpatialObject
> and convert back to file. This would be IMHO the most flexible for
> people.
>
> And thus you pipeline would become:
>
> 1. GDCMImageIO read (filename)
> 2. Segmentation
> 3. RTSTRUCT_IO write ouput_filename
>
> does this make sense ?
>
> Regards,
> --
> Mathieu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080702/5a38762f/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DicomImageWrite.cxx
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080702/5a38762f/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080702/5a38762f/attachment-0002.txt>


More information about the Insight-users mailing list