[vtkusers] vtkInteractorStyleImage::SetImageOrientation

David Doria daviddoria at gmail.com
Thu Sep 1 13:32:37 EDT 2011


> There are just a couple things out of order:
>
> Move the renderWindowInteractor->SetInteractorStyle( style ); line to
> immediately after the line where you create the style.  You shouldn't
> be calling any action methods on the style until you have connected it
> to the interactor.
>
> Don't call style->SetImageOrientation(leftToRight, bottomToTop); until
> after you have called ResetCamera().  The call to ResetCamera() moves
> the FocalPoint to the center of the data set, and it is usually best
> to do this centering first, before doing anything else to the camera.
> Having the data set centered ensures that the clipping range can be
> properly computed.
>
> Also the first call to ResetCamera (the one after AddViewProp) can be
> removed, since you have added a ResetCamera later in the file.
>
>  - David

Great, it's working. Thanks David!



More information about the vtkusers mailing list