vtkContourWidget

简介:

vtkContourWidget: 主要用来表示一个点集,点集之间有连线【相邻点,而非任意点】。轮廓可以是闭合的也可以是没有闭合的,这个取决于最后一个点的位置。

vtkContourRespresentation: 负责画点/线、所有点的位置、连线方式、轮廓区域的操作【主要通过 vtkPointPlacer 和 vtkContourLineInterpolator 这两个类在辅助实现该功能】。


基类: vtkAbstractWidget


Public Member Functions

virtual voidSetEnabled (int)
voidCreateDefaultRepresentation ()
voidCloseLoop ()
voidSetRepresentation (vtkContourRepresentation *r)
vtkContourRepresentation *GetContourRepresentation ()
virtual voidSetWidgetState (int)
virtual intGetWidgetState ()
voidSetAllowNodePicking (int)
virtual intGetAllowNodePicking ()
virtual voidAllowNodePickingOn ()
virtual voidAllowNodePickingOff ()
virtual voidSetFollowCursor (int)
virtual intGetFollowCursor ()
virtual voidFollowCursorOn ()
virtual voidFollowCursorOff ()
virtual voidSetContinuousDraw (int)
virtual intGetContinuousDraw ()
virtual voidContinuousDrawOn ()
virtual voidContinuousDrawOff ()
virtual voidInitialize (vtkPolyData *poly,int state=1, vtkIdList *idList=NULL)
virtual voidInitialize ()



vtkContourWidget:: SetRepresentation ( vtkContourRepresentation *r):指定一个在场景中代表这个 widget / 控件 的vtkWidgetRepresentation , 这里的representation 是 vtkProp的子类,所以它可以加到 vtkRenderer

vtkContourRepresentation * vtkContourWidget:: GetContourRepresentation( ) :返回一个representation

static void SelectAction(vtkAbstractWidget*):
static void AddFinalPointAction(vtkAbstractWidget*);
static void MoveAction(vtkAbstractWidget*);
static void EndSelectAction(vtkAbstractWidget*);
static void DeleteAction(vtkAbstractWidget*);
static void TranslateContourAction(vtkAbstractWidget*);
static void ScaleContourAction(vtkAbstractWidget*);
static void ResetAction(vtkAbstractWidget*);



附录一
vtkPointPlacer:

Abstract interface to translate 2D display positions to world coordinates.

Most widgets in VTK have a need to translate of 2D display coordinates (as reported by the RenderWindowInteractor) to 3D world coordinates. This class is an abstraction of this functionality. A few subclasses are listed below:

1) vtkFocalPlanePointPlacer: This class converts 2D display positions to world positions such that they lie on the focal plane.

2) vtkPolygonalSurfacePointPlacer: Converts 2D display positions to world positions such that they lie on the surface of one or more specified polydatas.

3) vtkImageActorPointPlacer: Converts 2D display positions to world positions such that they lie on an ImageActor

4) vtkBoundedPlanePointPlacer: Converts 2D display positions to world positions such that they lie within a set of specified bounding planes.

5) vtkTerrainDataPointPlacer: Converts 2D display positions to world positions such that they lie on a height field.

Point placers provide an extensible framework to specify constraints on points. The methods ComputeWorldPosition, ValidateDisplayPosition and ValidateWorldPosition may be overridden to dictate whether a world or display position is allowed. These classes are currently used by the HandleWidget and the ContourWidget to allow various constraints to be enforced on the placement of their handles. 



  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值