[vtkusers] interaction with vtkImageViewer?

Lawrence M. Lifshitz Lawrence.Lifshitz at umassmed.edu
Tue Jun 6 11:09:10 EDT 2000


Hi, I am successfully using the vtkImageViewer class to
display slices from an image. I can loop through, doing:

    for (i=minz;1 == 1;)
	{viewer->SetZSlice(i);
         viewer->Render(); 
	 if (i >= maxz) i = minz;
	 else i++;
         sleep(500);
	}

and see all the slices changing. I have not been able to do anything
like RenderWindowInteractor, ie, catch keystrokes,etc.
I have also not figured out how to give the viewport persistence.
As soon as I exit the loop (and the program) the viewing window
disappears (which I guess makes sense?), but I want the user to
be able to move forward and back in z, pick a pixel and have my
program return a pixel value, etc.
Any pointers would be great.

	Larry
-- 
Lawrence M. Lifshitz, Ph.D.	    
Biomedical Imaging Group - University of Massachusetts Medical School
Phone: (508) 856-3392  	   email:    Lawrence.Lifshitz at umassmed.edu
FAX: (508) 856-1840	   web:	     http://invitro.umassmed.edu/~lml




More information about the vtkusers mailing list