[vtkusers] How to display a bouding box around a dataset?

LEGUAY Romain romain.leguay at gmail.com
Thu Apr 7 03:05:49 EDT 2011


Good morning everyone!
I work with a VTK wrapping Java. 
I try to display the bounding box around a dataSet.
I use a vtkOutlineFilter but I obtain just a box without the dataSet. Moreover, the box dimension is different from the dataSet's bounds.

This is a sample of my code:

vtkOutlineFilter boundingBox = new vtkOutlineFilter();
boundingBox.SetInput(myDataSet.getVtkDataSet());
boundingBox.Update();

vtkDataSet dataSet = boundingBox.GetOutput();


After this I display this new dataSet with this:

vtkMapper mapper = new vtkDataSetMapper();
((vtkDataSetMapper) mapper).SetInput(dataSet);

vtkActor actor = new vtkActor();
actor.GetProperty().EdgeVisibilityOn();
actor.SetMapper(mapper);

vtkPanel panel = new vtkPanel();
vtkRenderer renderer = panel.GetRenderer();
renderer.AddActor(actor);


Does anyone have any idea why I don't get a beautiful box around my dataSet?

Thanks.

Romain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110407/351adcfd/attachment.htm>


More information about the vtkusers mailing list