<div dir="ltr">On Fri, Jan 30, 2015 at 6:05 AM, <a href="mailto:cameron.palmer@ntnu.no">cameron.palmer@ntnu.no</a> <span dir="ltr"><<a href="mailto:cameron.palmer@ntnu.no" target="_blank">cameron.palmer@ntnu.no</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="word-wrap:break-word">
<div style="margin:0px;font-size:11px">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?</div>
<div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(112,61,170)">
<br>
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(112,61,170)">
vtkImageData<span style="color:rgb(0,0,0)">* imageData;</span></div>
<div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(112,61,170)">
<span style="color:rgb(0,0,0)">...</span></div>
<div style="margin:0px;font-size:11px;font-family:Menlo">
<div style="margin:0px;color:rgb(112,61,170)"><span style="color:rgb(187,44,162)">auto</span><span style="color:rgb(0,0,0)"> resample =
</span>vtkSmartPointer<span style="color:rgb(0,0,0)"><</span>vtkImageReslice<span style="color:rgb(0,0,0)">>();</span></div>
<div style="margin:0px;color:rgb(112,61,170)"><span style="color:rgb(0,0,0)">resample->SetInput(imageData);</span></div>
<div style="margin:0px;color:rgb(112,61,170)"><span style="color:rgb(0,0,0)">...</span></div>
<div style="margin:0px;color:rgb(112,61,170)"><span style="color:rgb(0,0,0)">resample->Update();</span></div></div></div></blockquote><div><br>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.)<br><br>Here is an example of a basic use of vtkImageSlice:<br><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ImageReslice">http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ImageReslice</a><br><div><div class="gmail_signature"><br>David</div></div></div></div></div></div>