[vtkusers] Problem with resizing an image
ochampao
ochampao at hotmail.com
Thu Mar 1 07:09:37 EST 2018
Hi David.
Your first recommendation using vtkImageResize followed by
vtkImageChangeInformation works vert well. Thanks a lot for you help.
For reference, here is my working code:
vtkNew<vtkImageResize> resizeFilter;
resizeFilter->SetResizeMethodToOutputDimensions();
resizeFilter->SetOutputDimensions(image1_dims[0], image1_dims[1], 0);
resizeFilter->InterpolateOn();
resizeFilter->SetInputData(image2);
resizeFilter->Update();
vtkNew<vtkImageChangeInformation> changeFilter;
changeFilter->SetInputConnection(resizeFilter->GetOutputPort());
changeFilter->SetOutputSpacing(image1->GetSpacing());
changeFilter->Update();
Regards,
P.
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list