简体   繁体   English

更改边界框的大小

[英]Changing size of bounding box

Is it possible to change the size of a bounding box in VTK? 是否可以在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. 类似于vtkCubeAxesActor东西,比如SetBounds方法。

Any suggestions? 有什么建议么?

The vtkOutlineFilter does not have a parameter for adjusting the bounding box. vtkOutlineFilter没有用于调整边界框的参数。 You can always create a dummy polydata input to your vtkOutlineFilter whose vtkPoints object's bounds are enlarged versions of the true bounds. 您始终可以为vtkOutlineFilter创建虚拟多边形输入,其vtkPoints对象的边界是真实边界的放大版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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