[Paraview] zoom to data

Tomislav Maric tomislav.maric at fsb.hr
Sat Nov 1 12:47:45 EDT 2008


Hi Peter,

thank you so much for the help, it got me on the way, but I still have
some questions.

Here's what i've tried: 

    I didn't set wireframe, points , etc, and ResetCamera and
StillRender give me a black screen. I took your advice and did this:

view = servermanager.CreateRenderView()

camera = view.GetActiveCamera()

and then i played arround with camera.SetPosition() and camera.Zoom(),
and without setting the wireframe or anything else, I got the picture of
my data. Now I'm really puzzled. Why doesn't ResetCamera place my data
within the display window in the first place? 

And one other thing worries me: if I make any view change via the camera
object (i.e. camera.SetPosition(x,y,t)), any call to StillRender()
brings back the black screen. Still, if I save my data like this:

view.WriteImage ('pathNameOfMyData','vtkPNGWriter'), and afterwards call
StillRender() my data's back on the view window. 

Does it matter if I'm reading .vtk data from stand alone python
interpreter linked correctly to work with paraview modules?


Regards,
Tomislav

On Sat, 2008-11-01 at 08:43 -0700, Peter Brady wrote:
> Hello Tomislav,
> 
> It sound's like your not calling ResetCamera().  That should do the
> equivalent of 'zoom to data'.  If you want your data to fill the whole
> window, try playing around with the
> servermanager.CreateRenderView().CameraPosition and ViewSize option.
> 
> Hope that helps,
> Peter.
> 
> On Sat, Nov 1, 2008 at 8:18 AM, Tomislav Maric <tomislav.maric at fsb.hr> wrote:
> > Hello,
> >
> > I'm browsing through servermanager.CreateRenderView().GetActiveCamera()
> > methods, and I have a question: is it possible somehow to set the active
> > camera properties so that all of the data is within vtk view window, but
> > without loading a paraview state file? When I work in Paraview GUI
> > frontend, there is a button "zoom to data" under the display tab in the
> > object inspector. Is there a proxy for that button, that applies on the
> > view from servermanager.CreateRenderView? I'm having problems
> > visualising my data, because I'ts far away and under a strange angle at
> > the start, so i have to combine pitch, distance, position and other
> > methods to get it displayed.
> >
> > Thank you,
> >
> > Tomislav Maric
> >
> > _______________________________________________
> > ParaView mailing list
> > ParaView at paraview.org
> > http://www.paraview.org/mailman/listinfo/paraview
> >



More information about the ParaView mailing list