<div dir="ltr"><div>Hi Filippo,</div><div><br></div><div>The code looks correct.  It should resample the the image to "maxWidth"</div><div>and "maxHeight".  Note that "resampling" means that it changes the size</div><div>of the voxels and hence changes the resolution of the image. It does not</div><div>change the size of the image on the screen, if that is what you are trying</div><div>to do.  In order to do that, you would have to zoom in with the camera.</div><div><br></div><div> - David</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 23, 2016 at 11:56 AM, Jecko90 <span dir="ltr"><<a href="mailto:filippo.santarelli@unicam.it" target="_blank">filippo.santarelli@unicam.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!!<br>
<br>
I'm trying to resize all the vtkImageActors of a vtkRenderer to a fixed<br>
width and height.<br>
The code snippet below in my nooby opinion should work, instead it does<br>
nothing.<br>
What are the mistakes I did?<br>
<br>
I've been stuck with this problem for days...Please help me to solve it!!<br>
<br>
        vtkSmartPointer<vtkProp> Prop = PropCollection->GetNextProp();<br>
        if (Prop->IsA("vtkImageActor")) {<br>
            vtkSmartPointer<vtkImageActor> ImageActor =<br>
vtkImageActor::SafeDownCast(Prop);<br>
<br>
            vtkSmartPointer<vtkImageResize> ImageResize =<br>
vtkSmartPointer<vtkImageResize>::New();<br>
            ImageResize->SetResizeMethodToOutputDimensions();<br>
            ImageResize->SetOutputDimensions(maxWidth, maxHeight, -1);<br>
            ImageResize->SetInputData(ImageActor->GetMapper()->GetInput());<br>
            ImageResize->Update();<br>
<br>
ImageActor->GetMapper()->SetInputConnection(ImageResize->GetOutputPort());<br>
        }<br>
        renderWindow->Render();<br></blockquote></div></div></div>