[vtkusers] vtkImageData transform with vtkImageResample/Reslice

cameron.palmer at ntnu.no cameron.palmer at ntnu.no
Fri Jan 30 08:00:21 EST 2015


You just made me think of it. vtkSmartPointer. I’ve gotten so used to shared_ptr I forget the syntax is slightly different.

Isn’t this correct?
vtkSmartPointer<vtkImageReslice>::New()
NOT
vtkSmartPointer<vtkImageReslice>()

Out of curiosity will this go away in favor of the standard library?

From: David Doria <daviddoria at gmail.com<mailto:daviddoria at gmail.com>>
Date: fredag 30. januar 2015 13.23
To: Cameron Lowell Palmer <cameron.palmer at ntnu.no<mailto:cameron.palmer at ntnu.no>>
Cc: VTK Users <vtkusers at vtk.org<mailto:vtkusers at vtk.org>>
Subject: Re: [vtkusers] vtkImageData transform with vtkImageResample/Reslice

On Fri, Jan 30, 2015 at 6:05 AM, cameron.palmer at ntnu.no<mailto:cameron.palmer at ntnu.no> <cameron.palmer at ntnu.no<mailto:cameron.palmer at ntnu.no>> wrote:
I’ve seen a number of online examples using image reslice and resample that don’t seem to work for me. I simply want to scale the image so resample seems to be the way to go, but I always have trouble with the various Input methods. What is the correct formulation for using vtkImageData as input?

vtkImageData* imageData;
...
auto resample = vtkSmartPointer<vtkImageReslice>();
resample->SetInput(imageData);
...
resample->Update();

Please provide the smallest possible compilable example of what you're trying to do, along with an explanation of what is not working (Is there a compiler error? If so, what is it? Is there a runtime error? Does it crash? If so, where? etc.)

Here is an example of a basic use of vtkImageSlice:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ImageReslice

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150130/f01b4502/attachment.html>


More information about the vtkusers mailing list