[vtkusers] newbee with imaging
kitware-vtk at kulnet.kuleuven.ac.be
kitware-vtk at kulnet.kuleuven.ac.be
Thu May 3 14:11:15 EDT 2001
--- Forwarded by news2mail for "Joris Vanden Wyngaerd" <Joris.VandenWyngaerd at esat.kuleuven.ac.be> ---
I have been using vtk for a while now, upto now for 3D visualization.
I am now trying to display a simple 2D image.
I did manage to show the image, but not as nice as I am used to with the 3D
stuff.
I got this far :
vtkImageData *whatInWindow = id;
vtkImageViewer * iv = vtkImageViewer::New();
iv->SetColorLevel(128.0F);
iv->SetColorWindow(iv->GetColorLevel()*2);
iv->SetInput(whatInWindow);
while (1)
{
iv->Render();
}
iv->Delete();
I put the while(1) in to be able to look at the image before it dissapears.
I know this can't be right and I've been looking for something like
vtkRenderWindowInteractor for vtkImageWindow.
I did not find anything.
Can anybody put me on the right track ?
Joris
More information about the vtkusers
mailing list