[vtkusers] Scale an image.
David Gobbi
dgobbi at atamai.com
Thu Mar 23 10:56:52 EST 2006
Hi Ana,
You can use vtkImageReslice to resample the first image so that it
matches the second:
vtkImageReslice *reslice = vtkImageReslice::New();
reslice->SetInput(image_to_scale);
reslice->SetResliceTransform(transform);
reslice->SetInformationInput(target_image);
reslice->SetInterpolationModeToLinear();
blend->SetInput(0, target_image);
blend->SetInput(1, reslice->GetOutput());
The "transform" can be used to control the position and scale of the
first image with
respect to the second image, and vtkImageReslice makes sure that the one
image is
resampled to match the other (and possibly cropped or padded, depending
on how
much the transform magnifies or shrinks the image).
- David
Ana Sandro wrote:
> Hello everybody,
>
> My question is how to make an image bigger or smaller without using
> an actor?.
> I use vtkImageviewer2 to visualize the final image and what I put into
> it is this image blendeed with another one.So, I need to sclae one of
> them in order to they both have the same size before to put them into
> vtkImageBlend.I have problems to apply vtkTransform.Someone could help
> me?I'd be so gatefull.
> Thank you to all.
>
> _________________________________________________________________
> Dale rienda suelta a tu tiempo libre. Mil ideas para exprimir tu ocio
> con MSN Entretenimiento. http://entretenimiento.msn.es/
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list