<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:"times new roman", "new york", "times", serif;font-size:12pt"><DIV>Hello Luis,<BR></DIV><DIV><BR></DIV><DIV>I have manually converted the pixel type to unsigned long (ElementType = MET_ULONG) in. mhd file and loaded with 3Dslicer. It works but the 3D-image is not correctly displayed. I get as 3D two axial-view side by side. If I visualize it in my program with vtk, then I get purposeful 3D-image.</DIV><DIV><BR></DIV><DIV><BR></DIV><DIV><BR></DIV><DIV>Here are the screenshots:</DIV><DIV><BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt">Output-Image of watershed on my program (visualized with vtkContourFilter):</DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><SPAN><A target="_blank"
 href="http://www.wopsys.com/bilder/watershed_visualizedwithvtk.png">http://www.wopsys.com/bilder/watershed_visualizedwithvtk.png</A></SPAN></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt">Output-Image of watershed on 3DSlicer:</DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><SPAN><A target="_blank" href="http://www.wopsys.com/bilder/watershed.JPG">http://www.wopsys.com/bilder/watershed.JPG</A></SPAN></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt">Output-Image of DicomSeriesReadImageWrite2,
 so before segmentation:</DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><SPAN><A target="_blank" href="http://www.wopsys.com/bilder/before_segmentation.png">http://www.wopsys.com/bilder/before_segmentation.png</A></SPAN></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt">Thank you.</DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><BR><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt"><FONT size="2" face="Tahoma"><HR size="1"><B><SPAN style="font-weight: bold;">Von:</SPAN></B> Luis Ibanez &lt;luis.ibanez@kitware.com&gt;<BR><B><SPAN style="font-weight:
 bold;">An:</SPAN></B> Yusuf OEZBEK &lt;nasil122002@yahoo.de&gt;<BR><B><SPAN style="font-weight: bold;">CC:</SPAN></B> ITK Mailinglist &lt;insight-users@itk.org&gt;; VTK Mailinglist &lt;vtkusers@vtk.org&gt;; nasil122002@gmail.com<BR><B><SPAN style="font-weight: bold;">Gesendet:</SPAN></B> Mittwoch, den 26. Mai 2010, 19:56:18 Uhr<BR><B><SPAN style="font-weight: bold;">Betreff:</SPAN></B> Re: [Insight-users] visualization-problem after segmentation and  cropping<BR></FONT><BR><BR>Hi Yusuf,<BR><BR>Excellent.<BR><BR>Thanks for posting the screenshots.<BR><BR><BR>They illustrate that the pipeline is working correctly<BR>up to the output of the region growing filter.<BR><BR><BR>You can now focus on getting the Watershed <BR>
filter to work correctly by using as output image<BR>an image of pixel type "unsigned long" and <BR>making sure that it doesn't turn into "long long"<BR>in your 64 bits machine.<BR><BR>Please post the screenshot of the Watershed<BR>
output once you get it to work.<BR><BR><BR>    Thanks<BR><BR><BR>           Luis<BR><BR><BR>-------------------------------------------------------------------<BR><DIV class="gmail_quote">On Tue, May 25, 2010 at 4:14 PM, Yusuf OEZBEK <SPAN dir="ltr">&lt;<A rel="nofollow" ymailto="mailto:nasil122002@yahoo.de" target="_blank" href="mailto:nasil122002@yahoo.de">nasil122002@yahoo.de</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex;"><DIV><DIV style=""><DIV>Hello Luis,<BR></DIV><DIV><BR></DIV><DIV>I have the.mhd files loaded with 3DSlicer. Here are the screenshots:</DIV>
<DIV><BR></DIV><DIV>Output-Image of Region Growing:</DIV><DIV><SPAN><A rel="nofollow" target="_blank" href="http://www.wopsys.com/bilder/regiongrowing_notcropped.JPG">http://www.wopsys.com/bilder/regiongrowing_notcropped.JPG</A></SPAN></DIV>
<DIV><SPAN><A rel="nofollow" target="_blank" href="http://www.wopsys.com/bilder/regiongrowing_cropped.JPG">http://www.wopsys.com/bilder/regiongrowing_cropped.JPG</A></SPAN></DIV><DIV><BR></DIV><DIV><BR></DIV><DIV>Output-Image of DicomSeriesReadImageWrite2:</DIV>
<DIV><SPAN><A rel="nofollow" target="_blank" href="http://www.wopsys.com/bilder/DicomSeriesReadImageWrite2.JPG">http://www.wopsys.com/bilder/DicomSeriesReadImageWrite2.JPG</A></SPAN></DIV><DIV><BR></DIV><DIV><BR></DIV><DIV><BR></DIV><DIV>
<BR></DIV><DIV style="font-family:times new roman, new york, times, serif;font-size:12pt;">Thanks.<BR><DIV style="font-family:arial, helvetica, sans-serif;font-size:10pt;"><FONT face="Tahoma" size="2"><DIV class="im"><HR size="1">
<B><SPAN style="font-weight:bold;">Von:</SPAN></B> Luis Ibanez &lt;<A rel="nofollow" ymailto="mailto:luis.ibanez@kitware.com" target="_blank" href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</A>&gt;<BR><B><SPAN style="font-weight:bold;">An:</SPAN></B> Yusuf OEZBEK &lt;<A rel="nofollow" ymailto="mailto:nasil122002@yahoo.de" target="_blank" href="mailto:nasil122002@yahoo.de">nasil122002@yahoo.de</A>&gt;<BR>
</DIV><B><SPAN style="font-weight:bold;">CC:</SPAN></B> ITK Mailinglist &lt;<A rel="nofollow" ymailto="mailto:insight-users@itk.org" target="_blank" href="mailto:insight-users@itk.org">insight-users@itk.org</A>&gt;; VTK Mailinglist &lt;<A rel="nofollow" ymailto="mailto:vtkusers@vtk.org" target="_blank" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A>&gt;; <A rel="nofollow" ymailto="mailto:vtkusers-request@vtk.org" target="_blank" href="mailto:vtkusers-request@vtk.org">vtkusers-request@vtk.org</A>; <A rel="nofollow" ymailto="mailto:nasil122002@gmail.com" target="_blank" href="mailto:nasil122002@gmail.com">nasil122002@gmail.com</A><BR>
<B><SPAN style="font-weight:bold;">Gesendet:</SPAN></B> Dienstag, den 25. Mai 2010, 17:00:30 Uhr<BR><B><SPAN style="font-weight:bold;">Betreff:</SPAN></B> Re: [Insight-users]
 visualization-problem after segmentation and  cropping<BR></FONT><DIV><DIV class="h5"><BR>Hi Yusuf,<BR><BR><BR>When you are debugging a pipeline you should<BR>start by verifying that the data has been properly<BR>
loaded in memory, and then you should proceed<BR>to check out the output of every intermediate filter<BR>in order: from source to final output.<BR><BR><BR>Please start by doing the following:<BR><BR><BR>    Verify that you succeeded reading the DICOM series.<BR>
<BR>    Simply write the output of the Series reader to<BR>    an output file.<BR><BR>    This essentially the code that you will see in<BR>    the example:<BR><BR><BR>    Insight/Examples/IO/<BR>        DicomSeriesReadImageWrite2.cxx<BR>
<BR><BR>    Open that file with any visualization software<BR><BR>    For example:<BR><BR>    1) Paraview. (<A rel="nofollow" target="_blank" href="http://www.paraview.org">http://www.paraview.org</A>)  or<BR>    2) Slicer, (<A rel="nofollow" target="_blank" href="http://www.slicer.org">http://www.slicer.org</A>)  or<BR>
    3) SNAP, (<A rel="nofollow" target="_blank" href="http://sourceforge.net/projects/itk-snap/">http://sourceforge.net/projects/itk-snap/</A>)  or<BR>    4) VV (<A rel="nofollow" target="_blank" href="http://www.creatis.insa-lyon.fr/rio/vv">http://www.creatis.insa-lyon.fr/rio/vv</A>)<BR>
<BR><BR>Please let us know if you manage to do that initial<BR>test, (it will be great if you post a screen shot of<BR>that output image)<BR><BR>and then we will guide you to the next step.<BR><BR><BR><BR>    Regards,<BR>
<BR><BR>         Luis<BR><BR><BR>--------------------------------------------------<BR>On Mon, May 24, 2010 at 10:26 PM, Yusuf OEZBEK &lt;<A rel="nofollow" ymailto="mailto:nasil122002@yahoo.de" target="_blank" href="mailto:nasil122002@yahoo.de">nasil122002@yahoo.de</A>&gt; wrote:<BR>
&gt; Hello,<BR>&gt;<BR>&gt;  I have a problem with cut (cropping) and visualization a 3D image, which I<BR>&gt; produced by the segmentation-method “watershed and region
 growing”. In the<BR>&gt; beginning I read the DICOM images with itkImageSeriesReader, then I run<BR>&gt; watershed or region growing algorithm, in order to connect itk with vtk and<BR>&gt; a 3D image produce and for the displaying of segmentation I use<BR>
&gt; vtkContourFilter. After segmentation for cropping the images I use<BR>&gt; vtkBoxClipDataSet and vtkDataSetSurfaceFilter, but the result is a black<BR>&gt; screen.  When I read the images with vtkDICOMImageReader or<BR>
&gt; itkImageSeriesReader and then segmented with volume rendering, marching<BR>&gt; cubes watershed and region growing, then it works completely well. The<BR>&gt; problem arises only when cut for watershed and region growing algorithm.<BR>
&gt; What am I doing wrong?<BR>&gt;<BR>&gt; To understand my problem better, please see my screenshots on the following<BR>&gt; link.<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; <A rel="nofollow" target="_blank" href="http://www.wopsys.com/bilder/segmentation.html">http://www.wopsys.com/bilder/segmentation.html</A><BR>
&gt;<BR>&gt;<BR>&gt;<BR>&gt; To determine whether there missing of any geometrical informations. I had<BR>&gt; sent the following outputs of tests.<BR>&gt;<BR>&gt; <A rel="nofollow" target="_blank" href="http://www.wopsys.com/Outputs/Output_MarchingCubes.txt">http://www.wopsys.com/Outputs/Output_MarchingCubes.txt</A><BR>
&gt; <A rel="nofollow" target="_blank" href="http://www.wopsys.com/Outputs/Output_VolumeRendering.txt">http://www.wopsys.com/Outputs/Output_VolumeRendering.txt</A><BR>&gt; <A rel="nofollow" target="_blank" href="http://www.wopsys.com/Outputs/Output_Watershed.txt">http://www.wopsys.com/Outputs/Output_Watershed.txt</A><BR>
&gt; <A rel="nofollow" target="_blank" href="http://www.wopsys.com/Outputs/Output_RegionGrowing.txt">http://www.wopsys.com/Outputs/Output_RegionGrowing.txt</A><BR>&gt;<BR>&gt; Thanks.<BR>&gt;<BR>&gt;<BR>&gt; ________________________________<BR>
&gt; Von: Luis Ibanez &lt;<A rel="nofollow" ymailto="mailto:luis.ibanez@kitware.com" target="_blank" href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</A>&gt;<BR>&gt; An: Yusuf OEZBEK &lt;<A rel="nofollow" ymailto="mailto:nasil122002@yahoo.de" target="_blank" href="mailto:nasil122002@yahoo.de">nasil122002@yahoo.de</A>&gt;<BR>
&gt; CC: ITK Mailinglist &lt;<A rel="nofollow" ymailto="mailto:insight-users@itk.org" target="_blank" href="mailto:insight-users@itk.org">insight-users@itk.org</A>&gt;; VTK Mailinglist<BR>&gt; &lt;<A rel="nofollow" ymailto="mailto:vtkusers@vtk.org" target="_blank" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A>&gt;; <A rel="nofollow" ymailto="mailto:nasil122002@gmail.com" target="_blank" href="mailto:nasil122002@gmail.com">nasil122002@gmail.com</A><BR>
&gt; Gesendet: Sonntag, den 18. April 2010, 1:12:33 Uhr<BR>&gt; Betreff: Re: [Insight-users] Cropping Problem<BR>&gt;<BR>&gt;<BR>&gt; Hi Yusuf,<BR>&gt;<BR>&gt;<BR>&gt; You should start by separating the segmentation<BR>&gt; problem from the visualization problem.<BR>
&gt;<BR>&gt;<BR>&gt; Please do the following:<BR>&gt;<BR>&gt; 0) Just after you call:<BR>&gt;<BR>&gt;   
 reader-&gt;SetFileNames( fileNames );<BR>&gt;    reader-&gt;Update();<BR>&gt;<BR>&gt;    add<BR>&gt;<BR>&gt;    reader-&gt;GetOutput()-&gt;Print( std::cout );<BR>&gt;<BR>&gt;    then<BR>&gt;<BR>&gt; 1) Run the ITK segmentation pipeline until you<BR>
&gt;     get the segmented image, and save it as a<BR>&gt;     MetaImage file (with extension .mhd)<BR>&gt;<BR>&gt;<BR>&gt; 2) Post the content of the resulting .mhd file<BR>&gt;     back to the list, as well as the print out of<BR>
&gt;     the statement:<BR>&gt;<BR>&gt;    reader-&gt;GetOutput()-&gt;Print( std::cout );<BR>&gt;<BR>&gt;<BR><SPAN>&gt; 3) Use Paraview (<A rel="nofollow" target="_blank" href="http://www.paraview.org">www.paraview.org</A>) to load the</SPAN><BR>
&gt;     resulting image and extracting an iso-surface.<BR>&gt;     Compare that iso-surface with the one that<BR>&gt;     you get by directly from the DICOM image.<BR>&gt;     (and let us know what you
 find).<BR>&gt;<BR>&gt;<BR>&gt; With the information from (2) we should be<BR>&gt; able to identify if any geometrical information<BR>&gt; is missing from the ITK processing pipeline.<BR>&gt;<BR>&gt;<BR>&gt;    Thanks<BR>
&gt;<BR>&gt;<BR>&gt;          Luis<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; _____________________________________<BR><SPAN>&gt; Powered by <A rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</A></SPAN><BR>
&gt;<BR>&gt; Visit other Kitware open-source projects at<BR>&gt; <A rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>&gt;<BR>&gt; Kitware offers ITK Training Courses, for more information visit:<BR>
&gt; <A rel="nofollow" target="_blank" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</A><BR>&gt;<BR>&gt; Please keep messages on-topic and check the ITK FAQ at:<BR>&gt; <A rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>
&gt;<BR>&gt; Follow this link to subscribe/unsubscribe:<BR>&gt; <A rel="nofollow" target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR>&gt;<BR>&gt;<BR></DIV></DIV>
</DIV></DIV>


</DIV><BR></DIV></BLOCKQUOTE></DIV><BR>
</DIV></DIV>


</div><br></body></html>