<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 28, 2018 at 4:11 PM, ochampao <span dir="ltr"><<a href="mailto:ochampao@hotmail.com" target="_blank">ochampao@hotmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The first approach uses vtkImageResize. When using this approach the image<br>
that I am trying to resize appears unchanged on the screen.<br></blockquote><div><br></div><div>Well, vtkImageResize is actually a resampling filter.  So if you use it to</div><div>change the Dimensions of the image, it's really resampling the image</div><div>at a new resolution (i.e. a new pixel Spacing).</div><div><br></div><div>So if you want to stretch one PNG so that it fits over another, then two</div><div>steps are needed:</div><div>1) use vtkImageResize to resample</div><div>2) then use vtkImageChangeInformation to set the Spacing to be</div><div>the same as the other image</div><div><br></div><div>Also look at the BorderOn()/BorderOff() option of vtkImageResize.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The second approach uses vtkImageReslice. When using this approach the image<br>
is cropped rather than resized to match the dimensions of the first image<br>
(the image to be resized has larger dimensions). So this approach works<br>
partially.<br></blockquote><div><br></div><div>I won't go into detail, but the general idea is that unless you use</div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">SetResliceTransform() or SetResliceAxes() to apply a physical image</span><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">transformation, vtkImageReslice just</span> does resampling and/or cropping</div><div>and padding.</div><div><br></div><div> - David</div></div></div></div>