<div id="RTEContent">Hi all,<br> i've writed a code similar to the one in section 7.12.3 of the guide to read a serie of 131 Dicom file from a directory (each file contain a slice), then i save it into a volume file named "volume.vtk" (i've tried "volume.dcm" too). the reading and saving process was ok since i get well&nbsp; the file volume.vtk, but when i tried to visualize it with VolView for example i get error:<br> ERROR : In C:\kitware\VolView\VolView20\VTK\Graphics\vtkPlaneSource.cxx<br> vtkPlaneSource (0x05D490A0): Bad Plane coordinate system.<br> <br> and the program crash.<br> when i tried to open it with other example i find in InsightApplications i get only the first slice and not a volume...<br> this is my code :<br> <br> <br> <br>    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="Generator" content="Kate, the KDE Advanced Text Editor">  <pre> <span style="color: rgb(128, 0, 0);">char</span>* chooserName = fl_dir_chooser(<span
 style="color: rgb(221, 0, 0);">"select a dicom directory"</span>, <span style="color: rgb(0, 0, 255);">0</span>, <span style="color: rgb(0, 0, 255);">0</span>);    <span style="color: rgb(128, 128, 128);"><i>// Store the filename</i></span>   strcpy( m_InputImageDirectoryname, chooserName );   reader = ReaderType::New();   dicomIO = ImageIOType::New();   dicomIO-&gt;SetMaxSizeLoadEntry(<span style="color: rgb(0, 128, 128);">0xffff</span>);   nameGenerator = NamesGeneratorType::New();   reader-&gt;SetImageIO( dicomIO );   nameGenerator-&gt;SetUseSeriesDetails( <b>true</b> );   nameGenerator-&gt;SetDirectory( m_InputImageDirectoryname );      seriesUID = nameGenerator-&gt;GetSeriesUIDs();          seriesIdentifier = seriesUID.begin()-&gt;c_str();           fileNames = nameGenerator-&gt;GetFileNames( seriesIdentifier );     FileNamesBegin = fileNames.begin();     FileNamesItr = fileNames.end();     FileNamesEnd = fileNames.end();        rescaler = RescaleFilterType::New();  
 rescaler-&gt;SetOutputMinimum(   <span style="color: rgb(0, 0, 255);">0</span> );   rescaler-&gt;SetOutputMaximum( <span style="color: rgb(0, 0, 255);">255</span> );   reader-&gt;SetFileName( FileNamesItr-&gt;c_str() );    rescaler-&gt;SetInput( reader-&gt;GetOutput() );   reader-&gt;Update();   m_InputImage = reader-&gt;GetOutput();   m_InputImage-&gt;SetRequestedRegionToLargestPossibleRegion();</pre>&nbsp;<meta name="Generator" content="Kate, the KDE Advanced Text Editor">  <pre>seriesreader = SeriesReaderType::New();  <span style="color: rgb(128, 128, 128);"><i>// A GDCMImageIO object is created and connected to the reader. This object is</i></span> <span style="color: rgb(128, 128, 128);"><i>// the one that is aware of the internal intricacies of the DICOM format. </i></span>    seriesreader-&gt;SetImageIO( dicomIO );    seriesreader-&gt;SetFileNames( fileNames );      <b>try</b>       {       seriesreader-&gt;Update();       }     <b>catch</b> (itk::ExceptionObject &amp;ex)    
   {       std::cout &lt;&lt; ex &lt;&lt; std::endl;              }  <span style="color: rgb(128, 128, 128);"><i>// At this point, we have a volumetric image in memory that we can access by</i></span> <span style="color: rgb(128, 128, 128);"><i>// invoking the \code{GetOutput()} method of the reader.</i></span>        writer = Writer2Type::New();        writer-&gt;SetFileName(<span style="color: rgb(221, 0, 0);">"Volume.vtk"</span>);    writer-&gt;SetInput( reader-&gt;GetOutput() );      <b>try</b>       { <span style="color: rgb(128, 128, 128);"><i>// Software Guide : BeginCodeSnippet    </i></span>       writer-&gt;Update(); <span style="color: rgb(128, 128, 128);"><i>// Software Guide : EndCodeSnippet    </i></span>       }     <b>catch</b> (itk::ExceptionObject &amp;ex)       {       std::cout &lt;&lt; ex &lt;&lt; std::endl;       }</pre><br> <span style="font-style: italic;">Hi Pablo,<br> <br> </span>it hope u send me the small utility you wrote, <br> any comment is welcome.<br>
 Amir,<br> <br><br><b><i>charfeddine amir &lt;charfeddine_amir@yahoo.fr&gt;</i></b> a écrit&nbsp;:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <div id="RTEContent"><span style="font-style: italic;">Hi Mathieu<br> <br> </span>thx for your reply. i 've read the section 7.12 (about reading/writing DICOM from the ITK Software Guide) again, and espacially 7.12.3 (Reading a 2D DICOM Series and Writing a Volume ). i think that's what i'm searching.<br> but still have a question : what are Volume format supported i can specify? and how to visualize a volume?<br> <span style="font-style: italic;">Hi Pablo,<br> <br> </span>thx for your message,<br> it will be very helpful to me if u send me the small utility you wrote, if ever i crash somewhere (espacially i didn't know how to manipulate and visualize the result ( the volume )).<br> thx very much for your kindness<br> A+<br> TimCha<br> <br><b><i>Mathieu Malaterre
 &lt;mathieu.malaterre@kitware.com&gt;</i></b> a écrit&nbsp;:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Pablo,<br><br>How different is it from  <br>Insight/Examples/IO/DicomSeriesReadImageWrite2.cxx ? Maybe we could <br>update the example, if it is lacking some features.<br><br>TimCha,<br><br>I would also recommend reading the section (7.12) about reading/writing <br>DICOM from the ITK Software Guide.<br><br>HTH<br>Mathieu<br><br>Pablo D. Burstein wrote:<br>&gt; Yes, it is possible to do that. As a matter of fact I wrote and use a <br>&gt; small utility application that does just that. I can send it to you if <br>&gt; you wish.<br>&gt; <br>&gt; Cheers,<br>&gt; Pablo.<br>&gt; <br>&gt; charfeddine amir wrote:<br>&gt; <br>&gt;&gt; Hi all<br>&gt;&gt; I'm fronting a problem and hope your urgent help<br>&gt;&gt; is it possible after reading a number of 2D Dicom slice, to stack them <br>&gt;&gt; into a 3D volume, and
 visualize the volume!<br>&gt;&gt; any comment is welcome,<br>&gt;&gt; thx a lot ,<br>&gt;&gt; TimCha<br>&gt;&gt;<br>&gt;&gt; ------------------------------------------------------------------------<br>&gt;&gt; Nouveau  : téléphonez moins cher avec Yahoo! Messenger ! Découvez les <br>&gt;&gt; tarifs exceptionnels pour appeler la France et l'international. <br>&gt;&gt; Téléchargez <br>&gt;&gt; <http:> <br>&gt;&gt; la version beta.<br>&gt;&gt;<br>&gt;&gt; ------------------------------------------------------------------------<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; Insight-users mailing list<br>&gt;&gt; Insight-users@itk.org<br>&gt;&gt; http://www.itk.org/mailman/listinfo/insight-users<br>&gt;&gt;  <br>&gt;&gt;<br>&gt; <br>&gt; _______________________________________________<br>&gt; Insight-users mailing list<br>&gt; Insight-users@itk.org<br>&gt; http://www.itk.org/mailman/listinfo/insight-users<br>&gt;
 <br><br></http:></blockquote><br></div><div>   </div><hr size="1"> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. <a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.beta.messenger.yahoo.com">Téléchargez</a> la version beta._______________________________________________<br>Insight-users mailing list<br>Insight-users@itk.org<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote><br></div><p>
                <hr size=1> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.beta.messenger.yahoo.com">Téléchargez</a> la version beta.