<br>I have been working with the second manual which tells about ITK+VTK. I want to know how we can display both the original image and smoothened image together in one VTK window. Is it possible?<br><div class="gmail_quote">
<div>
<div><br></div><div>The code builds without any errors but I must going terribly wrong with my understanding of the concepts because only one image is being displayed..</div><div><div class="im"><br><div>#include &quot;itkImage.h&quot;</div>

<div>#include &quot;itkImageFileReader.h&quot;</div><div>#include &quot;itkImageToVTKImageFilter.h&quot;</div><div>#include &quot;vtkImageViewer.h&quot;</div><div>#include &quot;vtkRenderWindowInteractor.h&quot;</div></div>
<div>
#include &quot;itkCurvatureFlowImageFilter.h&quot;</div><div><br></div><div>int main(int argc, char **argv)</div><div class="im"><div><br></div><div>{</div><div>typedef itk::Image&lt;unsigned short,2&gt;ImageType;</div><div>
typedef itk::ImageFileReader&lt;ImageType&gt;ReaderType;</div>
<div>typedef itk::ImageToVTKImageFilter&lt;ImageType&gt;ConnectorType;</div></div><div>typedef itk::CurvatureFlowImageFilter&lt;ImageType,ImageType&gt;SmoothingFilterType;</div><div><br></div><div>ReaderType::Pointer reader=ReaderType::New();</div>

<div>ConnectorType::Pointer connector=ConnectorType::New();</div><div>SmoothingFilterType::Pointer smoother= SmoothingFilterType::New();</div><div class="im"><div><br></div><div>reader-&gt;SetFileName(argv[1]);</div><div>
connector-&gt;SetInput(reader-&gt;GetOutput());</div>
</div><div>smoother-&gt;SetNumberOfIterations(7);</div><div>smoother-&gt;SetTimeStep(0.2);</div><div class="im"><div><br></div><div>vtkImageViewer * viewer= vtkImageViewer::New();</div><div>vtkRenderWindowInteractor * renderWindowInteractor= vtkRenderWindowInteractor::New();</div>

<div><br></div><div>viewer-&gt;SetupInteractor(renderWindowInteractor);</div><div>viewer-&gt;SetInput(connector-&gt;GetOutput());</div><div>viewer-&gt;Render();</div><div>viewer-&gt;SetColorWindow(255);</div><div>viewer-&gt;SetColorLevel(128);</div>

<div>renderWindowInteractor-&gt;Start();</div></div><div>smoother-&gt;SetInput(reader-&gt;GetOutput());</div><div class="im"><div>viewer-&gt;SetupInteractor(renderWindowInteractor);</div><div>viewer-&gt;SetInput(connector-&gt;GetOutput());</div>

<div>viewer-&gt;Render();</div><div>viewer-&gt;SetColorWindow(255);</div><div>viewer-&gt;SetColorLevel(128);</div><div>renderWindowInteractor-&gt;Start();</div><div>return 0;</div><div>}</div><div><br></div></div><div>Looking forward to hear from you.</div>

<div>Regards,</div><div>Niha</div></div></div></div><br>