[Paraview] Help getting resetting cameras between batch viz runs
Rick Muller
rpmuller at gmail.com
Thu Sep 1 17:46:21 EDT 2011
I'm using the Python scripting facility in Paraview to do some batch
visualization of some semiconductor models I'm simulating. The Start/Stop
Trace feature is great, and I've already put together something quite
usable. However, I can't figure out how to reset the camera between
different simulations.
The code coming out of the Trace feature looked something like:
rv = pv.GetRenderView()
rv.CameraFocalPoint = [0.223, -0.0160,-0.334]
rv.CameraParallelScale = 1.684
rv.CenterOfRotation = [0.223, -0.0160,-0.334]
rv.CameraPosition = [0.223, -0.0160, 4.105]
rv.CameraClippingRange = [5.308, 8.033]
i.e. they already got the center of the object from some query to the
objects already in the database. What would I have to do to get this
information myself? I'm having a hard time finding info. I've tried reading
the doctext for the Outline and OutlineCorners features, and I've seen a
couple refs to a GetBounds command while googling around, but I can't find
anything that really helps.
My pipeline looks something like:
* Use the ExodusIIReader to create a reader object
* Use the aforementioned render view object to control the camera
* Create a slice object in the z-direction at a certain height
* Create a data representation and a colormap
* Render the object.
I can't tell which of the objects I would use for an Outline() or a
GetBounds() call. For example, I get the min/max values for the data in the
slice via
min,max = slice.PointData[0].GetRange()
but using s or s.PointData with Outline() or GetBounds() doesn't get me
anywhere. Can anyone nudge me in the right direction?
Thanks,
Rick
--
Rick Muller
rpmuller at gmail.com
505-750-7557
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110901/b74dfa9c/attachment.htm>
More information about the ParaView
mailing list