<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  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->SetMaxSizeLoadEntry(<span style="color: rgb(0, 128, 128);">0xffff</span>);   nameGenerator = NamesGeneratorType::New();   reader->SetImageIO( dicomIO );   nameGenerator->SetUseSeriesDetails( <b>true</b> );   nameGenerator->SetDirectory( m_InputImageDirectoryname );      seriesUID = nameGenerator->GetSeriesUIDs();          seriesIdentifier = seriesUID.begin()->c_str();           fileNames = nameGenerator->GetFileNames( seriesIdentifier );     FileNamesBegin = fileNames.begin();     FileNamesItr = fileNames.end();     FileNamesEnd = fileNames.end();        rescaler = RescaleFilterType::New();  
 rescaler->SetOutputMinimum(   <span style="color: rgb(0, 0, 255);">0</span> );   rescaler->SetOutputMaximum( <span style="color: rgb(0, 0, 255);">255</span> );   reader->SetFileName( FileNamesItr->c_str() );    rescaler->SetInput( reader->GetOutput() );   reader->Update();   m_InputImage = reader->GetOutput();   m_InputImage->SetRequestedRegionToLargestPossibleRegion();</pre> <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->SetImageIO( dicomIO );    seriesreader->SetFileNames( fileNames );      <b>try</b>       {       seriesreader->Update();       }     <b>catch</b> (itk::ExceptionObject &ex)    
   {       std::cout << ex << 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->SetFileName(<span style="color: rgb(221, 0, 0);">"Volume.vtk"</span>);    writer->SetInput( reader->GetOutput() );      <b>try</b>       { <span style="color: rgb(128, 128, 128);"><i>// Software Guide : BeginCodeSnippet    </i></span>       writer->Update(); <span style="color: rgb(128, 128, 128);"><i>// Software Guide : EndCodeSnippet    </i></span>       }     <b>catch</b> (itk::ExceptionObject &ex)       {       std::cout << ex << 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 <charfeddine_amir@yahoo.fr></i></b> a écrit :<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
 <mathieu.malaterre@kitware.com></i></b> a écrit :<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>> Yes, it is possible to do that. As a matter of fact I wrote and use a <br>> small utility application that does just that. I can send it to you if <br>> you wish.<br>> <br>> Cheers,<br>> Pablo.<br>> <br>> charfeddine amir wrote:<br>> <br>>> Hi all<br>>> I'm fronting a problem and hope your urgent help<br>>> is it possible after reading a number of 2D Dicom slice, to stack them <br>>> into a 3D volume, and
 visualize the volume!<br>>> any comment is welcome,<br>>> thx a lot ,<br>>> TimCha<br>>><br>>> ------------------------------------------------------------------------<br>>> Nouveau  : téléphonez moins cher avec Yahoo! Messenger ! Découvez les <br>>> tarifs exceptionnels pour appeler la France et l'international. <br>>> Téléchargez <br>>> <http:> <br>>> la version beta.<br>>><br>>> ------------------------------------------------------------------------<br>>><br>>> _______________________________________________<br>>> Insight-users mailing list<br>>> Insight-users@itk.org<br>>> http://www.itk.org/mailman/listinfo/insight-users<br>>>  <br>>><br>> <br>> _______________________________________________<br>> Insight-users mailing list<br>> Insight-users@itk.org<br>> http://www.itk.org/mailman/listinfo/insight-users<br>>
 <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.