[vtkusers] vtkImageViewer2::Render

Charl P. Botha c.p.botha at ewi.tudelft.nl
Mon Sep 1 08:23:05 EDT 2003


Hi there Mathieu,

On Mon, 2003-09-01 at 13:45, Mathieu Malaterre wrote:
> 	I am using vtkImageViewer2, but I find something a bit annoying.
> In vtkImageViewer2::Render, line 256, there is this code:
> 
> 
> 256:     this->Renderer->GetActiveCamera()->ParallelProjectionOn();
> 
> 
> 	as a result if you zoom or pan with the mouse and *then* play with 
> windowlevel event, you loose your zooming and panning.

I've tried your example (thanks for always sending a small Python
example!) and I can see the symptoms you describe.  It only happens the
first time however... i.e. I zoom, then I window/level (it loses the
zoom).  After this, all is fine, I can zoom and window/level without
losing zoom.

That first incident is a problem though.  I don't have so much time to
study vtkImageViewer2 right now, could you explain _why_ exactly the
ParallelProjection is causing the problem?  (the fact that removing it
fixes it doesn't count :)

My current suspicion is that ParallelProjectionOn() is being called too
late, and that the visual glitch we see is due to the fact that the
imageviewer starts up in perspective projection and gets switched to
parallel projection.  See what happens when you start your Python
example and immediately begin to window/level with the left mouse
button.

Thanks,
Charl

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/




More information about the vtkusers mailing list