简体   繁体   中英

Changing size of bounding box

Is it possible to change the size of a bounding box in VTK? If so, how can I do it? Suppose I have the following bounding box:

reader = vtkStructuredPointsReader()
reader.SetFileName("Hydrogen.vtk")

outline = vtkOutlineFilter()
outline.SetInputConnection(reader.GetOutputPort())
outlineMapper = vtkPolyDataMapper()
outlineMapper.SetInputConnection(outline.GetOutputPort())
outlineActor = vtkActor()
outlineActor.SetMapper(outlineMapper)
outlineActor.GetProperty().SetColor(0.0,0.0,1.0)
outlineActor.GetProperty().SetLineWidth(5.0)

I have tried looking for a property for it but I didn't find anything. Something similar to vtkCubeAxesActor , like the SetBounds method.

Any suggestions?

The vtkOutlineFilter does not have a parameter for adjusting the bounding box. You can always create a dummy polydata input to your vtkOutlineFilter whose vtkPoints object's bounds are enlarged versions of the true bounds.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM