<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Thanks, it works properly now.<BR>
&nbsp;<BR>
Now I have my vtkVolumeRayCastMapper and I have put the vtkImageData as input.<BR>
&nbsp;<BR>
So have I my 3D object or am I dreaming :P ?<BR>
&nbsp;<BR>
I know I'm not far, but there are some last steps I don't understand yet.<BR>
&nbsp;<BR>
Do you or anyone knows how to display it in my 3D View ?<BR>
&nbsp;<BR>
I must admit that I'm new in VTK and I don't understand well all this stuff yet.<BR>
I don't know for example if vtkVolumeRayCastMapper gerate a 3D model that I can display.<BR>
&nbsp;<BR>
If my questions seem stupid, forgive me.<BR><BR>
There's the function I've made and at the end, I have my vtkImageData in my vtkVolumeRayCastMapper. Still, I don't know what to do with it to display a 3D model.<BR>
&nbsp;<BR>
//code<BR>
&nbsp;<BR><FONT size=2>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>typedef</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>signed</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>short</FONT></FONT><FONT face="" size=2> PixelType;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>const</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>unsigned</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> Dimension = 3;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>typedef</FONT></FONT><FONT face="" size=2> itk::Image&lt; PixelType, Dimension &gt; ImageType;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>typedef</FONT></FONT><FONT face="" size=2> itk::ImageToVTKImageFilter&lt; ImageType &gt; ConnectorType;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>typedef</FONT></FONT><FONT face="" size=2> itk::ImageSeriesReader&lt; ImageType &gt; ReaderType;</FONT><BR>
<FONT face="" size=2>&nbsp;<BR>
ReaderType::Pointer reader = ReaderType::New();<BR>
&nbsp;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>typedef</FONT></FONT><FONT face="" size=2> itk::GDCMImageIO ImageIOType;</FONT><BR>
<FONT face="" size=2>&nbsp;<BR>
ImageIOType::Pointer dicomIO = ImageIOType::New();<BR>
reader-&gt;SetImageIO( dicomIO );<BR>
&nbsp;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>typedef</FONT></FONT><FONT face="" size=2> itk::GDCMSeriesFileNames NamesGeneratorType;</FONT><BR>
<FONT face="" size=2>&nbsp;<BR>
NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();<BR>
nameGenerator-&gt;SetUseSeriesDetails( </FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>true</FONT></FONT><FONT face="" size=2> );<BR>
nameGenerator-&gt;SetDirectory(</FONT><FONT face="" color=#a31515 size=2><FONT color=#a31515 size=2>"C:/Dicoms/PHENIX/dicoms/OS/"</FONT></FONT><FONT face="" size=2>);</FONT><BR>
<FONT face="" size=2>&nbsp;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>typedef</FONT></FONT><FONT face="" size=2> std::vector&lt; std::string &gt; SeriesIdContainer;</FONT><BR>
<FONT face="" size=2>&nbsp;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>const</FONT></FONT><FONT face="" size=2> SeriesIdContainer &amp; seriesUID = nameGenerator-&gt;GetSeriesUIDs();<BR>
SeriesIdContainer::<FONT face="">const_iterator</FONT> seriesItr = seriesUID.begin();<BR>
SeriesIdContainer::<FONT face="">const_iterator</FONT> seriesEnd = <FONT face="">seriesUID.end</FONT>();<BR>
&nbsp;<BR>
</FONT><FONT color=#0000ff size=2><FONT face="" color=#0000ff size=2>while</FONT></FONT><FONT face="" size=2>( seriesItr != seriesEnd )<BR>
{<BR>
std::cout &lt;&lt; seriesItr-&gt;c_str() &lt;&lt; </FONT><FONT face="" color=#a31515 size=2><FONT color=#a31515 size=2>"caca"</FONT></FONT><FONT face="" size=2> &lt;&lt; std::endl;<BR>
seriesItr++;<BR>
}<BR>
&nbsp;<BR>
std::string seriesIdentifier;<BR>
seriesIdentifier = seriesUID.begin()-&gt;c_str();<BR>
</FONT><FONT face="" color=#0000ff size=2><FONT face="" color=#0000ff size=2>typedef</FONT></FONT><FONT face="" size=2> std::vector&lt; std::string &gt; FileNamesContai</FONT><FONT face="" size=2>ner;</FONT><BR>
<FONT face="" size=2>&nbsp;<BR>
FileNamesContainer fileNames;<BR>
fileNames = nameGenerator-&gt;GetFileNames( seriesIdentifier );<BR>
reader-&gt;SetFileNames( fileNames );<BR>
&nbsp;<BR>
cout &lt;&lt; </FONT><FONT color=#a31515 size=2><FONT face="" color=#a31515 size=2>"updating the reader"</FONT></FONT><FONT face="" size=2> &lt;&lt; endl;</FONT><BR>
<FONT face="" size=2>&nbsp;<BR>
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>try<BR></FONT></FONT><FONT size=2>
{<BR>
reader-&gt;Update();<BR>
}<BR>
</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>catch</FONT></FONT><FONT face="" size=2> (itk::ExceptionObject &amp;ex)<BR>
{<BR>
std::cout &lt;&lt; ex &lt;&lt; std::endl;<BR>
}<BR>
&nbsp;<BR>
ConnectorType::Pointer connector = ConnectorType::New();<BR>
&nbsp;<BR>
vtkVolumeRayCastMapper *mapper = vtkVolumeRayCastMapper::New();<BR>
mapper-&gt;SetInput(connector-&gt;GetOutput());<BR>
&nbsp;<BR>
//end code<BR>
</FONT><BR><BR><BR>&nbsp;<BR>

<HR id=stopSpelling>
<BR>
&gt; Date: Wed, 21 May 2008 10:20:08 -0500<BR>&gt; From: ahs@cfdrc.com<BR>&gt; To: cocorim@hotmail.fr<BR>&gt; CC: vtkusers@vtk.org<BR>&gt; Subject: Re: [vtkusers] 3d reconstruction<BR>&gt; <BR>&gt; Are you linking against the vtkVolumeRendering library? You would need <BR>&gt; to do that in order to use vtkVolumeRayCastMapper (or any other volume <BR>&gt; rendering mapper).<BR>&gt; <BR>&gt; - Amy<BR>&gt; <BR>&gt; Alosha [Dread_Lord] wrote:<BR>&gt; &gt;<BR>&gt; &gt; Thank you for your answer.<BR>&gt; &gt; <BR>&gt; &gt; The vtkDicomImageReader actually works, but I have some LINK error <BR>&gt; &gt; while instantiating vtkVolumeRayCastMapper.<BR>&gt; &gt; <BR>&gt; &gt; ( vtkVolumeRayCastMapper *mapper = vtkVolumeRayCastMapper::New() )<BR>&gt; &gt; <BR>&gt; &gt; Anyway, is the vtkDicomImageReader build a 3D mesh using the 2D dicom <BR>&gt; &gt; serie, or just generate a data set ?<BR>&gt; &gt; <BR>&gt; &gt; In this last case, how can I display it in my igstk::View3D ? I <BR>&gt; &gt; suppose I have to build a mesh with it ?<BR>&gt; &gt; <BR>&gt; &gt; I guess there is a VTK class which takes a volume VTK data set and <BR>&gt; &gt; build a mesh with it, but I don't know which class :S.<BR>&gt; &gt; <BR>&gt; &gt; Anyway, thanks for your answer, and I'm all ears if anyone knows how <BR>&gt; &gt; to generate a 3D object from my 2D Dicom series for displaying in a <BR>&gt; &gt; igstk::View3D<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt; From: w_e_b_m_a_s_t_e_r_6_9@hotmail.com<BR>&gt; &gt; To: cocorim@hotmail.fr<BR>&gt; &gt; CC: vtkusers@vtk.org<BR>&gt; &gt; Subject: RE: [vtkusers] 3d reconstruction<BR>&gt; &gt; Date: Thu, 22 May 2008 00:44:50 +1000<BR>&gt; &gt;<BR>&gt; &gt; You can actually read in a DICOM file as a 3D object just using VTK.<BR>&gt; &gt;<BR>&gt; &gt; vtkDICOMImageReader *dicomReader = vtkDICOMImageReader::New();<BR>&gt; &gt; dicomReader-&gt;SetDirectoryName( "C:\\dicomfolder\\");<BR>&gt; &gt;<BR>&gt; &gt; Have a look at Ray Cast Mapping as well (vtkVolumeRayCastMapper).<BR>&gt; &gt; I'm not sure if there is a better way though. With this approach,<BR>&gt; &gt; the image has to reduce its image quality (goes a bit blurry)<BR>&gt; &gt; while you move the camera. Then once you are finished moving<BR>&gt; &gt; around it will return to its original quality.<BR>&gt; &gt;<BR>&gt; &gt; Alternatively you can read it in using ITK, and then convert it<BR>&gt; &gt; back to VTK. I haven't tried this, so maybe someone can let you<BR>&gt; &gt; know the best way to do it.<BR>&gt; &gt;<BR>&gt; &gt; Regards,<BR>&gt; &gt; Cameron.<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt; From: cocorim@hotmail.fr<BR>&gt; &gt; To: vtkusers@vtk.org<BR>&gt; &gt; Date: Wed, 21 May 2008 13:48:12 +0200<BR>&gt; &gt; Subject: [vtkusers] 3d reconstruction<BR>&gt; &gt;<BR>&gt; &gt; Hi all !<BR>&gt; &gt; <BR>&gt; &gt; Maybe the problem has already been exposed, and I'm sorry if<BR>&gt; &gt; it was.<BR>&gt; &gt; <BR>&gt; &gt; I've managed to made a basic DICOM Viewer. It has 4 views ; 3<BR>&gt; &gt; views to axial, coronal ans sagittal orientation, and a<BR>&gt; &gt; tridimentionnal view for 3d reconstruction.<BR>&gt; &gt; <BR>&gt; &gt; I'm using igstk::View2D and igstk::View3D.<BR>&gt; &gt; <BR>&gt; &gt; I instantiate a CTImageSpatialObject in which I put the CT<BR>&gt; &gt; Image from the CTImageReader.<BR>&gt; &gt; Then I put the CTImageSpatialObject into a<BR>&gt; &gt; CTImageSpatialObjectRepresentation and I give it to the<BR>&gt; &gt; igstk::View2D.<BR>&gt; &gt; <BR>&gt; &gt; It's working properly and I can navigate into slides in the<BR>&gt; &gt; three 2D views.<BR>&gt; &gt; <BR>&gt; &gt; My problems is now how to perform a 3D reconstruction of the<BR>&gt; &gt; DICOM and display it in the 3D View.<BR>&gt; &gt; <BR>&gt; &gt; I've search on the net and on the mailing list for some help,<BR>&gt; &gt; but all this is still a little unclear to me.<BR>&gt; &gt; I just know that ITK and VTK has to be used, but I have no<BR>&gt; &gt; idea of how.<BR>&gt; &gt; <BR>&gt; &gt; If you can help me on that or at least show me the way for<BR>&gt; &gt; begin, I would be very greatfull.<BR>&gt; &gt; <BR>&gt; &gt; Thanks a lot !<BR>&gt; &gt;<BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt; Discutez gratuitement avec vos amis en vidéo ! Téléchargez<BR>&gt; &gt; Messenger, c'est gratuit ! &lt;http://www.windowslive.fr/messenger/&gt; <BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt; Click here Search for local singles online @ Lavalife.<BR>&gt; &gt; &lt;http://a.ninemsn.com.au/b.aspx?URL=http://lavalife9.ninemsn.com.au/clickthru/clickthru.act?id%3Dninemsn%26context%3Dan99%26locale%3Den_AU%26a%3D30290&amp;_t=764581033&amp;_r=email_taglines_Search_OCT07&amp;_m=EXT&gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt; Centralisez tous vos comptes mails dans Hotmail ! Créez un compte <BR>&gt; &gt; Hotmail, c'est gratuit ! &lt;http://www.windowslive.fr/hotmail/&gt;<BR>&gt; &gt; ------------------------------------------------------------------------<BR>&gt; &gt;<BR>&gt; &gt; _______________________________________________<BR>&gt; &gt; This is the private VTK discussion list.<BR>&gt; &gt; Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>&gt; &gt; Follow this link to subscribe/unsubscribe:<BR>&gt; &gt; http://www.vtk.org/mailman/listinfo/vtkusers<BR>&gt; &gt; <BR>&gt; <BR>&gt; -- <BR>&gt; Amy Squillacote Phone: (256) 726-4839<BR>&gt; Computer Scientist Fax: (256) 726-4806<BR>&gt; CFD Research Corporation Web: http://www.cfdrc.com<BR>&gt; 215 Wynn Drive, Suite 501<BR>&gt; Huntsville, AL 35805<BR>&gt; <BR>&gt; <BR><BR><br /><hr />Avec Windows Live Messenger restez en contact avec tous vos amis !  <a href='http://www.windowslive.fr/messenger/' target='_new'>Téléchargez Messenger, c'est gratuit !</a></body>
</html>