<div dir="ltr">Don&#39;t use vtkSmartPointer&lt;vtkImageData&gt;. Instead use vtkImageData* foo2()<br><br>Jothy<br><div></div><br><br><div class="gmail_quote">On Thu, Sep 22, 2011 at 4:38 AM, Prathamesh Kulkarni <span dir="ltr">&lt;<a href="mailto:prathameshmkulkarni@gmail.com">prathameshmkulkarni@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><br><div>Hello, </div><div><br></div><div>I am trying to implement a pipeline looking like this:</div><div>
<br></div><div>Foo1(){</div><div><br></div><div>// ITK filters.....</div><div><br></div><div>vtkSmartPointer&lt;vtkImageData&gt; vtk_image = Foo2(ITK_data_ptr);</div>

<div><br></div><div>Render(vtk_image);</div><div>}</div><div><br></div><div>vtkSmartPointer&lt;vtkImageData&gt; Foo2(ITK_data_ptr){</div><div><br></div><div>//Process ITK data</div><div><br></div><div>// Convert ITK image to VTK image</div>


<div><br></div><div>// Process VTK image data</div><div><br></div><div>return VTK image data;</div><div>}</div><div><br></div><div><br></div><div>However, using the above pipeline, I can only render inside Foo2. Rendering inside Foo1 (as shown above) always crashes pointing to itkVTKImageExport.h. Is there a better way of dealing this while still following the above pipeline?</div>


<div><br></div><div>Thanks,</div><div>Prathamesh</div></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<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><br clear="all"><br>-- <br><div dir="ltr">Jothybasu K Selvaraj<br>PhD Student<br>University of Liverpool<br>Liverpool,UK<br></div><br>
</div>