Convert vtkImageData to vtkAlgorithmOutput type

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Convert vtkImageData to vtkAlgorithmOutput type

Arefin Shamsil
Hi,
I am trying to combine a vtkImageData image and its transform using vtkTransformPolyDataFilter. Here is my setup

vtkSmartPointer<vtkTransformPolyDataFilter> imagePose = itkSmartPointer<vtkTransformPolyDataFilter>::New();

imagePose->SetInputConnection(image); // image is of vtkImageData ----- error is here
imagePose->SetTransform(imageTransform);

Problem is SetInputConnection is not accepting vtkImageData type, it only accepts vtkAlgorithmOutput type. 

I am not really sure what to do here. Online search has not been of much help. Is there any way to do it?



 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Convert vtkImageData to vtkAlgorithmOutput type

Jounly
use  vtkImageReslice instead of  vtkTransformPolyDataFilter

Arefin Shamsil <[hidden email]> 于2019年4月13日周六 上午10:37写道:
Hi,
I am trying to combine a vtkImageData image and its transform using vtkTransformPolyDataFilter. Here is my setup

vtkSmartPointer<vtkTransformPolyDataFilter> imagePose = itkSmartPointer<vtkTransformPolyDataFilter>::New();

imagePose->SetInputConnection(image); // image is of vtkImageData ----- error is here
imagePose->SetTransform(imageTransform);

Problem is SetInputConnection is not accepting vtkImageData type, it only accepts vtkAlgorithmOutput type. 

I am not really sure what to do here. Online search has not been of much help. Is there any way to do it?



 
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers