Dear Mathieu,<br><br>Thank you very much for your reply.<br><br>>> Is this integrated with any of the Mesh and/or the Meta Object in ITK too ?<br><br>Currently, at the end of my segmentation in ITK, I have ROIs in mask format.<br>
I still have to work on converting this mask to a polygon so that in can be written to a ROI module.<br>Because of my little exposure to ITK, I am not aware whether this conversion involves Mesh or Meta Objects.<br><br>I am facing problem while calling the KeepOriginalUIDOn ().<br>
A runtime exception is thrown when the above function is called.<br>I am afraid there is some error in the way I am using the ImageFileWriter, since the error is occurring while updating the writer.<br>To reproduce the problem, I have created a sample code.<br>
Please find attached the .cxx & the associated CMakeLists.txt files.<br>Can you please help me?<br><br>Thank you for the details on the possible pipeline for the RTSTRUCT, which is more flexible and general.<br>I will give a try part by part. <br>
<br>Many thanks for your help.<br><br>Warm Regards,<br>Subrahmanyam Gorthi<br><br>EPFL-STI-LTS5<br>Station 11<br>CH - 1015 Lausanne<br>Switzerland<br><br><br><br><br><br><br><div class="gmail_quote">On Wed, Jul 2, 2008 at 12:03 PM, Mathieu Malaterre <<a href="mailto:mathieu.malaterre@gmail.com" target="_blank">mathieu.malaterre@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Subrahmanyam,<br>
<br>
On Wed, Jul 2, 2008 at 11:30 AM, Subrahmanyam Gorthi<br>
<div><<a href="mailto:subrahmanyam.gorthi@gmail.com" target="_blank">subrahmanyam.gorthi@gmail.com</a>> wrote:<br>
</div><div>> Dear Mathieu,<br>
><br>
> Many THANKS for your detailed & prompt reply.<br>
><br>
> Here is what I am actually trying to implement in ITK:<br>
><br>
> Using a segmentation algorithm in ITK, I obtained the coordinates for 3-D<br>
> ROI of a patient's image .<br>
> I am now trying to export these results into a "DICOM-RT Structure-Set"<br>
> file, for RT-Planning in IMRT.<br>
<br>
</div>*Very* cool ! Is this integrated with any of the Mesh and/or the Meta<br>
Object in ITK too ?<br>
<div><br>
> In addition to ROI module, as the DICOM-RT structure-set file has to contain<br>
> other<br>
> mandatory modules like patient-module, study module etc.,<br>
> I am trying to selectively copy those modules from the associated patient's<br>
> 3-D CT image.<br>
<br>
</div>Ah, I see why the UID can remains the same here. You did not modify the image :)<br>
<div><br>
> I compared the tags of structure-set file that I am creating in ITK with<br>
> the file generated by another software that<br>
> a Physician here is using in his hospital;<br>
> he was manually drawing the contours on the CT image and the corresponding<br>
> DICOM-RT structure-set file is generated by the software.<br>
<br>
</div>ok<br>
<div><br>
> I observed that for the "structure-set" file generated by that software,<br>
> "study-instance UID" tag is same as that of the<br>
> other 3-D CT DICOM images and hence, I am trying to do the same for the file<br>
> created through ITK.<br>
<br>
</div>Yup, in this very special case, then you are even encouraged to keep<br>
the same UID :)<br>
<div><br>
> From your reply, I understand the importance safety issues in changing the<br>
> default behavior.<br>
> I would like to know:<br>
> 1. Is it possible to change the default behavior for ONLY selected UIDs that<br>
> are specified by the user?, and how?<br>
<br>
</div>I am not sure I understand that. but I guess you can do the in your<br>
code (application level):<br>
<br>
if( currentuid match [set of known uids] )<br>
GDCMImageIO->KeepOriginalUIDOn ()<br>
<div><br>
> 2. I want to finally contribute this code to ITK.<br>
<br>
</div>Even better !<br>
<div><br>
> It would be very happy to know and most probably, implement any better ways<br>
> or modifications to the current approach.<br>
> Your suggestions in this regard will be of great help to me.<br>
<br>
</div>IMHO ITK is clearly lacking support for RTSTRUCT object, so any kind<br>
of contribution would be AFAIK very welcome. For instance in a newer<br>
release of GDCM, we have now integrated RTSTRUCT object nicely in VTK:<br>
<br>
See:<br>
<a href="http://gdcm.sourceforge.net/html/classvtkGDCMPolyDataReader.html" target="_blank">http://gdcm.sourceforge.net/html/classvtkGDCMPolyDataReader.html</a><br>
<br>
Thus RTSTRUCT now appears as a set of vtkPolyData which is the base<br>
object for 2D unstructred data in VTK.<br>
I would think that a similar approach can (should?) be taken for ITK.<br>
You would need to implement a itk::somethingIO that will read RTSTRUCT<br>
and then convert it to either a itk::Mesh/itkQEMesh or SpatialObject<br>
and convert back to file. This would be IMHO the most flexible for<br>
people.<br>
<br>
And thus you pipeline would become:<br>
<br>
1. GDCMImageIO read (filename)<br>
2. Segmentation<br>
3. RTSTRUCT_IO write ouput_filename<br>
<br>
does this make sense ?<br>
<br>
Regards,<br>
--<br>
<font color="#888888">Mathieu<br>
</font></blockquote></div><br>