[vtkusers] Default camera position, or scale bar?

Atwood, Robert C r.atwood at imperial.ac.uk
Fri Aug 3 15:23:10 EDT 2007


I am trying to add a size scale to my volume image, and a couple of
things I don't understand have cropped up. I want the scale to represent
the size accounting for the zoom of the object. 
Follwign some old suggestion in the mailing list, I have tried to use
vtkCubeAxesActor2d but, the strange thing is that if I add this, the
camera position defaults to (0,0,1) instead of a nice view automatically
encompassing the actors in the scene. How should I arrange that the
default view is as normal?
If I have the statement  

sbar->SetCamera(ren1->GetActiveCamera());

Then the camera position gets set to 

CamPos 0.000000 0.000000 1.000000
CamFoc 0.000000 0.000000 0.000000
CamRoll 0.000000

If I don't have that, then it gets set to:

CamPos 24.500000 24.500000 188.457191
CamFoc 24.500000 24.500000 24.500000
CamRoll 0.000000

I'm using a  vtkFlRenderWindowInteractor to view a volume data that is
50x50x50 and followed the example coming with the
vtkFlRenderWindowInteractor source, using C++.

Any clues or poitners to useful doc's appreciated. Thanks
Robert





More information about the vtkusers mailing list