[vtkusers] Stretching and shrinking 2D images

Florin ... armataa at gmail.com
Wed May 24 14:46:37 EDT 2006


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.



More information about the vtkusers mailing list