<div dir="ltr"><br>Hi Sara,<br><br>Thanks for your detailed question regarding Watersheds.<br><br><br>Please take a look at the attached code.<br><br>It process the image &quot;Patient01&quot; from <br><br>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <span style="color: rgb(163, 21, 21);"><a href="http://public.kitware.com/pub/itk/Data/LiverTumor/" rel="nofollow" target="_blank"><font color="#800080">http://public.kitware.com/pub/itk/Data/LiverTumor/</font></a>.</span><br>
&nbsp;<br>in a time of<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4 minutes 38 seconds.<br><br>This was profiled in an QuadCore Intel Xeon 2.66 Ghz. (with 16Gb RAM).<br>(although the process uses only one of the cores)<br><br>Note that the process peaks 1Gb of memory allocation when it is running.<br>
<br>Depending on the configuration of your system, it may be that the program<br>started swapping memory at some point.<br><br>Please give a try at the attached code and let us know what you find.<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp; Regards,<br>
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<br><br><br>-----------------------------------------------------------------------------------------------------------------------------------<br><div class="gmail_quote">On Fri, Aug 22, 2008 at 11:19 AM, sara meghellati <span dir="ltr">&lt;<a href="mailto:sara_meghellati@yahoo.fr">sara_meghellati@yahoo.fr</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;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
I&#39;m sending again my&nbsp;questions as nobody have answered me. <br><br>--- En date de&nbsp;: <b>Ven 22.8.08, sara meghellati <i>&lt;<a href="mailto:sara_meghellati@yahoo.fr" target="_blank">sara_meghellati@yahoo.fr</a>&gt;</i></b> a écrit&nbsp;:<br>

<blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;">De: sara meghellati &lt;<a href="mailto:sara_meghellati@yahoo.fr" target="_blank">sara_meghellati@yahoo.fr</a>&gt;<br>Objet: [Insight-users] Please help:problem with wathershed segmentation applied to 3D grayscale Image<br>
À: &quot;insight itk&quot; &lt;<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>&gt;<br>Date: Vendredi 22 Août 2008, 13h48<br><br>
<div>
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="top"><pre><span>Dear itk experts,</span></pre><pre><span>I'm segmenting a volume (3D grayscale image) using watershed method inspired from the WatershedSegmentation1 </span></pre><pre><span>(2D </span><span>RGB</span><span> image as input)example provided within itk.</span></pre>
<pre><span>My code is well working for 2D grayscale images but when I change </span></pre><pre><span>the dimension to 3, the code
 still running as it get stuck in a </span></pre><pre><span>loop!! I wait for more than 18min but no results!! Is it normal </span></pre><pre><span>that this kind of segmentation takes age to give the result in 3d </span></pre>
<pre><span>image or there is some thing wrong with my code? Please could you help me on that? Also, how can I follow the progress of the code?</span></pre><pre><span>I pass my code bellow. In this example I used the 3D data provided</span></pre>
<pre><span>in</span><span style="color: rgb(163, 21, 21);"> <a href="http://public.kitware.com/pub/itk/Data/LiverTumor/" rel="nofollow" target="_blank"><font color="#800080">http://public.kitware.com/pub/itk/Data/LiverTumor/</font></a>.</span></pre>
<pre><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&lt;iostream&gt;</span></span></pre>
<p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkImage.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkGradientAnisotropicDiffusionImageFilter.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkGradientMagnitudeImageFilter.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkWatershedImageFilter.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkImageFileReader.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkImageFileWriter.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkVectorCastImageFilter.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkUnaryFunctorImageFilter.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkScalarToRGBPixelFunctor.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: rgb(163, 21, 21);">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkVTKImageExport.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;itkVTKImageImport.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: rgb(163, 21, 21);">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkImageData.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkImageImport.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkImageExport.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkImageActor.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkRenderer.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkRenderWindow.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkRenderWindowInteractor.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkInteractorStyleTrackballCamera.h&quot;</span> </span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">#include</span><span style="font-size: 10pt;"> <span style="color: rgb(163, 21, 21);">&quot;vtkImageShiftScale.h&quot;</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: rgb(163, 21, 21);">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: green;">// This function will connect the given itk::VTKImageExport filter to the given vtkImageImport filter.</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">template</span><span style="font-size: 10pt;"> &lt;<span style="color: blue;">typename</span> ITK_Exporter, <span style="color: blue;">typename</span> VTK_Importer&gt;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">void</span><span style="font-size: 10pt;"> ConnectPipelines(ITK_Exporter exporter, VTK_Importer* importer)</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">{</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetUpdateInformationCallback(exporter-&gt;GetUpdateInformationCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetPipelineModifiedCallback(exporter-&gt;GetPipelineModifiedCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetWholeExtentCallback(exporter-&gt;GetWholeExtentCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetSpacingCallback(exporter-&gt;GetSpacingCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetOriginCallback(exporter-&gt;GetOriginCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetScalarTypeCallback(exporter-&gt;GetScalarTypeCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetNumberOfComponentsCallback(exporter-&gt;GetNumberOfComponentsCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetPropagateUpdateExtentCallback(exporter-&gt;GetPropagateUpdateExtentCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetUpdateDataCallback(exporter-&gt;GetUpdateDataCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetDataExtentCallback(exporter-&gt;GetDataExtentCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetBufferPointerCallback(exporter-&gt;GetBufferPointerCallback());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span>importer-&gt;SetCallbackUserData(exporter-&gt;GetCallbackUserData());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">}</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">int</span><span style="font-size: 10pt;"> main( )</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">{<span>&nbsp; </span></span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::Image&lt;<span style="color: blue;">float</span>, 3&gt;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ImageType; <span style="color: green;"></span></span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::Image&lt;<span style="color: blue;">unsigned</span> <span style="color: blue;">long</span>, 3&gt;<span>&nbsp;&nbsp; </span>LabeledImageType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::Image&lt;<span style="color: blue;">float</span>, 3&gt;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ScalarImageType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: green;">// for visualization purposes</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::RGBPixel&lt;<span style="color: blue;">unsigned</span> <span style="color: blue;">char</span>&gt;<span>&nbsp;&nbsp; </span>RGBPixelType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::Image&lt;RGBPixelType, 3&gt;<span>&nbsp;&nbsp;&nbsp; </span>RGBImageType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::ImageFileReader&lt;ImageType&gt; FileReaderType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::GradientAnisotropicDiffusionImageFilter&lt;ImageType,<span>&nbsp;&nbsp; </span>ImageType&gt;<span>&nbsp; </span>DiffusionFilterType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::GradientMagnitudeImageFilter&lt;ImageType,ImageType&gt;<span>&nbsp;&nbsp;&nbsp; </span>GradientMagnitudeFilterType; </span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::WatershedImageFilter&lt;ScalarImageType&gt; WatershedFilterType; <span style="color: green;"></span></span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::ImageFileWriter&lt;RGBImageType&gt; FileWriterType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>FileReaderType::Pointer reader = FileReaderType::New</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>reader-&gt;SetFileName( <span style="color: rgb(163, 21, 21);">&quot;c:/images/3DImages/Patient01.mhd&quot;</span><span>&nbsp; </span>);</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: green;">//reader-&gt;SetFileName(&quot;c:/Images/BrainProtonDensitySlice.png&quot;);</span></span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: green;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>DiffusionFilterType::Pointer diffusion = DiffusionFilterType::New();</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>diffusion-&gt;SetNumberOfIterations( atoi(<span style="color: rgb(163, 21, 21);">&quot;10&quot;</span>) );</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>diffusion-&gt;SetConductanceParameter( atof(<span style="color: rgb(163, 21, 21);">&quot;2.0&quot;</span>) );</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>diffusion-&gt;SetTimeStep(0.0625);</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: green;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>GradientMagnitudeFilterType::Pointer gradient = GradientMagnitudeFilterType::New();</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>WatershedFilterType::Pointer watershed = WatershedFilterType::New();</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>watershed-&gt;SetLevel( atof(<span style="color: rgb(163, 21, 21);">&quot;0.15&quot;</span>) );<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>watershed-&gt;SetThreshold( atof(<span style="color: rgb(163, 21, 21);">&quot;0.001&quot;</span>) );<span>&nbsp; </span><span style="color: green;"></span></span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::Functor::ScalarToRGBPixelFunctor&lt;<span style="color: blue;">unsigned</span> <span style="color: blue;">long</span>&gt;<span>&nbsp;&nbsp;&nbsp; </span>ColorMapFunctorType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">typedef</span> itk::UnaryFunctorImageFilter&lt;LabeledImageType,<span>&nbsp;&nbsp;&nbsp; </span>RGBImageType, ColorMapFunctorType&gt; ColorMapFilterType;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ColorMapFilterType::Pointer colormapper = ColorMapFilterType::New();</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>FileWriterType::Pointer writer = FileWriterType::New();</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>writer-&gt;SetFileName(<span style="color: rgb(163, 21, 21);">&quot;c:/Images/WatershedSegImg.mhd&quot;</span>);</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>diffusion-&gt;SetInput(reader-&gt;GetOutput());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>gradient-&gt;SetInput(diffusion-&gt;GetOutput());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>watershed-&gt;SetInput(gradient-&gt;GetOutput());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>colormapper-&gt;SetInput(watershed-&gt;GetOutput());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>writer-&gt;SetInput(colormapper-&gt;GetOutput());</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>writer-&gt;Update();</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; color: blue;">try</span><span style="font-size: 10pt;"> </span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp; </span>{</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>writer-&gt;Update();<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;</span><span>&nbsp;&nbsp; </span>}</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span><span style="color: blue;">catch</span> (itk::ExceptionObject &amp;e)</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp; </span>{</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>std::cerr &lt;&lt; e &lt;&lt; std::endl;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp; </span>}</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp;&nbsp;&nbsp; </span></span>
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;"><span>&nbsp; </span><span style="color: blue;">return</span> 0;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">&nbsp;</span> 
</p><p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt;">}</span></p><pre><span></span></pre><pre><span>Thanks</span></pre><pre>Sara <span></span></pre></td></tr></tbody></table><br>
<hr size="1">
Envoyé avec <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html" rel="nofollow" target="_blank">Yahoo! Mail</a>.<br>Une boite mail plus intelligente. </div>
<pre>_______________________________________________
Insight-users mailing list
<a href="mailto:Insight-users@itk.org" target="_blank">Insight-users@itk.org</a>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a>
</pre></blockquote></td></tr></tbody></table><div class="WgoR0d"><br>


      <hr size="1"> 
Envoyé avec <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html" target="_blank">Yahoo! Mail</a>.<br>Une boite mail plus intelligente. </div>
<br>_______________________________________________<br>
Insight-users mailing list<br>
<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>