简介:
vtkContourWidget: 主要用来表示一个点集,点集之间有连线【相邻点,而非任意点】。轮廓可以是闭合的也可以是没有闭合的,这个取决于最后一个点的位置。
vtkContourRespresentation: 负责画点/线、所有点的位置、连线方式、轮廓区域的操作【主要通过 vtkPointPlacer 和 vtkContourLineInterpolator 这两个类在辅助实现该功能】。
基类: vtkAbstractWidget
Public Member Functions | |
virtual void | SetEnabled (int) |
void | CreateDefaultRepresentation () |
void | CloseLoop () |
void | SetRepresentation (vtkContourRepresentation *r) |
vtkContourRepresentation * | GetContourRepresentation () |
virtual void | SetWidgetState (int) |
virtual int | GetWidgetState () |
void | SetAllowNodePicking (int) |
virtual int | GetAllowNodePicking () |
virtual void | AllowNodePickingOn () |
virtual void | AllowNodePickingOff () |
virtual void | SetFollowCursor (int) |
virtual int | GetFollowCursor () |
virtual void | FollowCursorOn () |
virtual void | FollowCursorOff () |
virtual void | SetContinuousDraw (int) |
virtual int | GetContinuousDraw () |
virtual void | ContinuousDrawOn () |
virtual void | ContinuousDrawOff () |
virtual void | Initialize (vtkPolyData *poly,int state=1, vtkIdList *idList=NULL) |
virtual void | Initialize () |
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*);
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.