[Insight-users] cannot return vtkImageData from itkImageToVTKImageFilter

Jothy jothybasu at gmail.com
Thu Sep 22 05:06:26 EDT 2011


Don't use vtkSmartPointer<vtkImageData>. Instead use vtkImageData* foo2()

Jothy


On Thu, Sep 22, 2011 at 4:38 AM, Prathamesh Kulkarni <
prathameshmkulkarni at gmail.com> wrote:

>
> Hello,
>
> I am trying to implement a pipeline looking like this:
>
> Foo1(){
>
> // ITK filters.....
>
> vtkSmartPointer<vtkImageData> vtk_image = Foo2(ITK_data_ptr);
>
> Render(vtk_image);
> }
>
> vtkSmartPointer<vtkImageData> Foo2(ITK_data_ptr){
>
> //Process ITK data
>
> // Convert ITK image to VTK image
>
> // Process VTK image data
>
> return VTK image data;
> }
>
>
> 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?
>
> Thanks,
> Prathamesh
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


-- 
Jothybasu K Selvaraj
PhD Student
University of Liverpool
Liverpool,UK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110922/c249db3a/attachment.htm>


More information about the Insight-users mailing list