[vtk-developers] New image mappers

David Gobbi david.gobbi at gmail.com
Tue Apr 5 09:15:36 EDT 2011

On Mon, Apr 4, 2011 at 9:42 AM, Dean Inglis <dean.inglis at camris.ca> wrote:

> great work on the new image mappers/property!


> Not sure if this is a bug, but if I pre-set the slice mapper orientation
> to anything other than z:
> im.SetOrientationToX()
> when I run the script the slice orientation still comes up as z until I hit
> the x char.

The "im.SliceFacesCameraOn()" overrides "im.SetOrientationToX()".
When you press the "x" key, it is actually changing the camera position,
and that is what causes the slice orientation to change. This is 100%

Long story short: if you are using the interactor, then do not try to
change the orientation via the mapper.  Change it via the interactor,
using the interactor SetImageOrientation() method.  (Changing the
orientation solely through the mapper wouldn't be sufficient anyway...
you would still have to move the camera to match the new orientation).

> Also, I notice if I start in z orientation, and then hit z char, the slice
> changes (at leastnwith the example data set) by a slice or two.

I will look into this.  The default camera view might not be identical to the
view achieved by pressing "z" (not that the latter is user-definable).

> Finally, it would be useful to have events for StartSliceEvent, EndSliceEvent
> and an ImageOrientationChangedEvent in vtkInteractoStyleImage.

I'm not really a user of the interactor class, my modifications to it are
just to make it work nicely for examples.  So I don't have much interest
in developing it further.  However, I will be happy to provide code reviews
for any image-related patches that are submitted to Gerrit (hint, hint).

> Is there a reason why inverting the image by windowing is disabled?

I prefer a hard stop at maximum contrast (perhaps with a separate
button/control for inversion).  But I'm willing to be swayed by popular
opinion, as far as vtkInteractorStyleImage is concerned.

 - David

More information about the vtk-developers mailing list