[vtkusers] Bounds problem

José Ignacio Schäfer jose-schafer at hotmail.com
Thu Mar 2 13:51:58 EST 2017


Hi,

I am really new in vtk programming, so there may be a lot of things I don´t know yet or that I did wrong, please let me know if there is a simpler way to do what I am doing.



Right now I have the following problem and I hope you will be able to give me the solution or point me in the right direction.

I am using XMLStructuredGrid files (.vts) so I am opening them with the vtkXMLStructuredGridReader(). Then I am using a vtkStructuredGridGeometryFilter() and making a Deepcopy of it with a vtkPolyData() so that I can add the scalars extracted from the Reader. As Mapper I am using a vtkOpenGLPolyDataMapper()   and vtkLODActor() as an actor.




Using this piece of code:



"gridreader = vtk.vtkXMLStructuredGridReader()

gridreader.SetFilename(filename)

gridreader.Update()


gridreader.GetOutput().GetDimensions()"


I get the following dimensions (384, 216, 257)


The thing is that the Bounds that I get using: "gridreader = gridreader.GetOutput().GetBounds()" are (0.0, 215.0, 0.0, 383.0, 0.0, 240.0).

So... My problem is that when I render my Data, I can't se the whole Data extension.

I am also using vtkImplicitPlaneWidget() (that the user can move) to catch the position that the user selected moving the plane with the mouse, but I can´t move the plane through the whole extension of the X axis because the bounds are smaller than the size of my Data.


I have tryed to modify the bounds several times, but i haven't been able to render the whole data extension.


Maybe I am wrong and the bounds aren't my problem, but I would be very grateful if someone could help me.



Jose





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170302/bfee2dcf/attachment.html>


More information about the vtkusers mailing list