[vtkusers] Stretching and shrinking 2D images

marice at knology.net marice at knology.net
Wed May 24 18:51:01 EDT 2006


Take a look at the vtkImageResample filter. You can set the magnifaction
factor for each axis to be the ratio of the image size to window size.


On Wed, 24 May 2006 21:46:37 +0300, "Florin ..." <armataa at gmail.com> wrote :

> Hi.Im a new user on vtk and i have a problem.I want to make a tool for
> display color medical images. I had try with vtkImageViewer(
> vtkActor2D+ vtkImageMapper )and vtkImageViewer2 (vtkImageActor
> +vtkImageMapToWindowLevelColors) and have problem
> 
> Because vtkActor2D has no acces on camera, i cant use any function for
> zoom. I succed to zoom small images with SetPosition2(), but i cant
> fit big images(E.g 1800x1200) on my windows.
> 
> vtkImageActor work well until i try to change brightness or contrast(
> SetLevel() or
> SetWindow() from vtkImageMapToWindowLevelColors ) when my images
> become black &white.
> ---
> vtkImageMapToWindowLevelColors *mapper =vtkImageMapToWindowLevelColors::New();
> maper->SetInput(jpgReader->GetOutput);
> maper->SetLevel(126);
> maper->SetWindow(224);
> vtkImageActor* actor=vtkImageActor::New();
> actor->SetInput(maper->GetOutput());
> ---
> Pls tel me where i'm wrong or what classes i can use.
> _______________________________________________
> 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