VTK
|
represent the vtkContourWidget More...
#include <vtkContourRepresentation.h>
Public Types | |
enum | { Outside =0, Nearby } |
enum | { Inactive = 0, Translate, Shift, Scale } |
![]() | |
typedef vtkProp | Superclass |
Public Member Functions | |
virtual int | SetActiveNodeToWorldPosition (double pos[3]) |
virtual int | SetActiveNodeToWorldPosition (double pos[3], double orient[9]) |
virtual int | GetActiveNodeWorldPosition (double pos[3]) |
virtual int | GetActiveNodeWorldOrientation (double orient[9]) |
virtual int | GetActiveNodeDisplayPosition (double pos[2]) |
virtual int | GetNumberOfNodes () |
virtual int | GetNthNodeDisplayPosition (int n, double pos[2]) |
virtual int | GetNthNodeWorldPosition (int n, double pos[3]) |
virtual int | GetNthNodeWorldOrientation (int n, double orient[9]) |
virtual int | GetNthNodeSlope (int idx, double slope[3]) |
virtual int | GetNumberOfIntermediatePoints (int n) |
virtual int | DeleteLastNode () |
virtual int | DeleteActiveNode () |
virtual int | DeleteNthNode (int n) |
virtual void | ClearAllNodes () |
virtual int | AddNodeOnContour (int X, int Y) |
void | SetPointPlacer (vtkPointPlacer *) |
virtual vtkPointPlacer * | GetPointPlacer () |
void | GetNodePolyData (vtkPolyData *poly) |
virtual void | SetRebuildLocator (bool) |
virtual int | AddNodeAtWorldPosition (double x, double y, double z) |
virtual int | AddNodeAtWorldPosition (double worldPos[3]) |
virtual int | AddNodeAtWorldPosition (double worldPos[3], double worldOrient[9]) |
virtual int | AddNodeAtDisplayPosition (double displayPos[2]) |
virtual int | AddNodeAtDisplayPosition (int displayPos[2]) |
virtual int | AddNodeAtDisplayPosition (int X, int Y) |
virtual int | ActivateNode (double displayPos[2]) |
virtual int | ActivateNode (int displayPos[2]) |
virtual int | ActivateNode (int X, int Y) |
virtual int | SetActiveNodeToDisplayPosition (double pos[2]) |
virtual int | SetActiveNodeToDisplayPosition (int pos[2]) |
virtual int | SetActiveNodeToDisplayPosition (int X, int Y) |
virtual int | ToggleActiveNodeSelected () |
virtual int | GetActiveNodeSelected () |
virtual int | GetNthNodeSelected (int) |
virtual int | SetNthNodeSelected (int) |
virtual vtkContourRepresentationNode * | GetNthNode (int n) |
virtual int | SetNthNodeDisplayPosition (int n, int X, int Y) |
virtual int | SetNthNodeDisplayPosition (int n, int pos[2]) |
virtual int | SetNthNodeDisplayPosition (int n, double pos[2]) |
virtual int | SetNthNodeWorldPosition (int n, double pos[3]) |
virtual int | SetNthNodeWorldPosition (int n, double pos[3], double orient[9]) |
virtual int | GetIntermediatePointWorldPosition (int n, int idx, double point[3]) |
virtual int | AddIntermediatePointWorldPosition (int n, double point[3]) |
virtual int | AddIntermediatePointWorldPosition (int n, double point[3], vtkIdType ptId) |
virtual void | SetPixelTolerance (int) |
virtual int | GetPixelTolerance () |
virtual void | SetWorldTolerance (double) |
virtual double | GetWorldTolerance () |
virtual int | GetCurrentOperation () |
virtual void | SetCurrentOperation (int) |
void | SetCurrentOperationToInactive () |
void | SetCurrentOperationToTranslate () |
void | SetCurrentOperationToShift () |
void | SetCurrentOperationToScale () |
void | SetLineInterpolator (vtkContourLineInterpolator *) |
virtual vtkContourLineInterpolator * | GetLineInterpolator () |
virtual void | BuildRepresentation ()=0 |
virtual int | ComputeInteractionState (int X, int Y, int modified=0)=0 |
virtual void | StartWidgetInteraction (double e[2])=0 |
virtual void | WidgetInteraction (double e[2])=0 |
virtual void | ReleaseGraphicsResources (vtkWindow *w)=0 |
virtual int | RenderOverlay (vtkViewport *viewport)=0 |
virtual int | RenderOpaqueGeometry (vtkViewport *viewport)=0 |
virtual int | RenderTranslucentPolygonalGeometry (vtkViewport *viewport)=0 |
virtual int | HasTranslucentPolygonalGeometry ()=0 |
void | SetClosedLoop (int val) |
virtual int | GetClosedLoop () |
virtual void | ClosedLoopOn () |
virtual void | ClosedLoopOff () |
virtual void | SetShowSelectedNodes (int) |
virtual int | GetShowSelectedNodes () |
virtual void | ShowSelectedNodesOn () |
virtual void | ShowSelectedNodesOff () |
virtual vtkPolyData * | GetContourRepresentationAsPolyData ()=0 |
![]() | |
virtual void | PickingManagedOn () |
virtual void | PickingManagedOff () |
virtual void | SetPickingManaged (bool) |
virtual bool | GetPickingManaged () |
virtual void | SetRenderer (vtkRenderer *ren) |
virtual vtkRenderer * | GetRenderer () |
virtual void | PlaceWidget (double *vtkNotUsed(bounds[6])) |
virtual void | EndWidgetInteraction (double newEventPos[2]) |
virtual int | GetInteractionState () |
virtual void | Highlight (int vtkNotUsed(highlightOn)) |
virtual void | SetPlaceFactor (double) |
virtual double | GetPlaceFactor () |
virtual void | SetHandleSize (double) |
virtual double | GetHandleSize () |
virtual int | GetNeedToRender () |
virtual void | SetNeedToRender (int) |
virtual void | NeedToRenderOn () |
virtual void | NeedToRenderOff () |
virtual double * | GetBounds () |
virtual void | ShallowCopy (vtkProp *prop) |
virtual void | GetActors (vtkPropCollection *) |
virtual void | GetActors2D (vtkPropCollection *) |
virtual void | GetVolumes (vtkPropCollection *) |
virtual int | RenderOverlay (vtkViewport *vtkNotUsed(viewport)) |
virtual int | RenderOpaqueGeometry (vtkViewport *vtkNotUsed(viewport)) |
virtual int | RenderTranslucentPolygonalGeometry (vtkViewport *vtkNotUsed(viewport)) |
virtual int | RenderVolumetricGeometry (vtkViewport *vtkNotUsed(viewport)) |
vtkWidgetRepresentation * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
Protected Member Functions | |
vtkContourRepresentation () | |
~vtkContourRepresentation () | |
void | AddNodeAtPositionInternal (double worldPos[3], double worldOrient[9], int displayPos[2]) |
void | AddNodeAtPositionInternal (double worldPos[3], double worldOrient[9], double displayPos[2]) |
void | SetNthNodeWorldPositionInternal (int n, double worldPos[3], double worldOrient[9]) |
virtual void | UpdateLines (int index) |
void | UpdateLine (int idx1, int idx2) |
virtual int | FindClosestPointOnContour (int X, int Y, double worldPos[3], int *idx) |
virtual void | BuildLines ()=0 |
virtual int | UpdateContour () |
void | ComputeMidpoint (double p1[3], double p2[3], double mid[3]) |
virtual void | Initialize (vtkPolyData *, vtkIdList *) |
virtual void | Initialize (vtkPolyData *) |
virtual void | InitializeContour (vtkPolyData *, vtkIdList *) |
void | ResetLocator () |
void | BuildLocator () |
void | GetRendererComputedDisplayPositionFromWorldPosition (double worldPos[3], double worldOrient[9], int displayPos[2]) |
void | GetRendererComputedDisplayPositionFromWorldPosition (double worldPos[3], double worldOrient[9], double displayPos[2]) |
![]() | |
vtkWidgetRepresentation () | |
~vtkWidgetRepresentation () | |
void | AdjustBounds (double bounds[6], double newBounds[6], double center[3]) |
virtual void | RegisterPickers () |
virtual void | UnRegisterPickers () |
virtual void | PickersModified () |
vtkPickingManager * | GetPickingManager () |
double | SizeHandlesRelativeToViewport (double factor, double pos[3]) |
double | SizeHandlesInPixels (double factor, double pos[3]) |
vtkAssemblyPath * | GetAssemblyPath (double X, double Y, double Z, vtkAbstractPropPicker *picker) |
Protected Attributes | |
int | PixelTolerance |
double | WorldTolerance |
vtkPointPlacer * | PointPlacer |
vtkContourLineInterpolator * | LineInterpolator |
int | ActiveNode |
int | CurrentOperation |
int | ClosedLoop |
int | ShowSelectedNodes |
vtkContourRepresentationInternals * | Internal |
vtkTimeStamp | ContourBuildTime |
vtkIncrementalOctreePointLocator * | Locator |
bool | RebuildLocator |
![]() | |
vtkWeakPointer< vtkRenderer > | Renderer |
int | InteractionState |
double | StartEventPosition [3] |
double | PlaceFactor |
int | Placed |
double | InitialBounds [6] |
double | InitialLength |
int | ValidPick |
bool | PickingManaged |
double | HandleSize |
int | NeedToRender |
vtkTimeStamp | BuildTime |
Friends | |
class | vtkContourWidget |
typedef vtkWidgetRepresentation | Superclass |
static int | IsTypeOf (const char *type) |
static vtkContourRepresentation * | SafeDownCast (vtkObjectBase *o) |
virtual int | IsA (const char *type) |
vtkContourRepresentation * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkObjectBase * | NewInstanceInternal () const |
represent the vtkContourWidget
The vtkContourRepresentation is a superclass for various types of representations for the vtkContourWidget.
SetLineInterpolator
. BuildLines()
to interpolate lines using their display positions intead of world positions.Definition at line 119 of file vtkContourRepresentation.h.
Standard VTK methods.
Definition at line 127 of file vtkContourRepresentation.h.
anonymous enum |
Enumerator | |
---|---|
Outside | |
Nearby |
Definition at line 309 of file vtkContourRepresentation.h.
anonymous enum |
Enumerator | |
---|---|
Inactive | |
Translate | |
Shift | |
Scale |
Definition at line 314 of file vtkContourRepresentation.h.
|
protected |
|
protected |
|
static |
Standard VTK methods.
|
virtual |
Standard VTK methods.
Reimplemented from vtkWidgetRepresentation.
Reimplemented in vtkOrientedGlyphFocalPlaneContourRepresentation, vtkOrientedGlyphContourRepresentation, and vtkFocalPlaneContourRepresentation.
|
static |
Standard VTK methods.
|
protectedvirtual |
Standard VTK methods.
Reimplemented from vtkWidgetRepresentation.
Reimplemented in vtkOrientedGlyphFocalPlaneContourRepresentation, vtkOrientedGlyphContourRepresentation, and vtkFocalPlaneContourRepresentation.
vtkContourRepresentation* vtkContourRepresentation::NewInstance | ( | ) | const |
Standard VTK methods.
void vtkContourRepresentation::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
Standard VTK methods.
|
virtual |
Add a node at a specific world position. Returns 0 if the node could not be added, 1 otherwise.
|
virtual |
Add a node at a specific world position. Returns 0 if the node could not be added, 1 otherwise.
|
virtual |
Add a node at a specific world position. Returns 0 if the node could not be added, 1 otherwise.
|
virtual |
Add a node at a specific display position. This will be converted into a world position according to the current constraints of the point placer. Return 0 if a point could not be added, 1 otherwise.
|
virtual |
Add a node at a specific display position. This will be converted into a world position according to the current constraints of the point placer. Return 0 if a point could not be added, 1 otherwise.
|
virtual |
Add a node at a specific display position. This will be converted into a world position according to the current constraints of the point placer. Return 0 if a point could not be added, 1 otherwise.
|
virtual |
Given a display position, activate a node. The closest node within tolerance will be activated. If a node is activated, 1 will be returned, otherwise 0 will be returned.
|
virtual |
Given a display position, activate a node. The closest node within tolerance will be activated. If a node is activated, 1 will be returned, otherwise 0 will be returned.
|
virtual |
Given a display position, activate a node. The closest node within tolerance will be activated. If a node is activated, 1 will be returned, otherwise 0 will be returned.
|
virtual |
|
virtual |
|
virtual |
Move the active node based on a specified display position. The display position will be converted into a world position. If the new position is not valid or there is no active node, a 0 will be returned. Otherwise, on success a 1 will be returned.
|
virtual |
Move the active node based on a specified display position. The display position will be converted into a world position. If the new position is not valid or there is no active node, a 0 will be returned. Otherwise, on success a 1 will be returned.
|
virtual |
Move the active node based on a specified display position. The display position will be converted into a world position. If the new position is not valid or there is no active node, a 0 will be returned. Otherwise, on success a 1 will be returned.
|
virtual |
Set/Get whether the active or nth node is selected.
|
virtual |
Set/Get whether the active or nth node is selected.
|
virtual |
Set/Get whether the active or nth node is selected.
|
virtual |
Set/Get whether the active or nth node is selected.
|
virtual |
Get the world position of the active node. Will return 0 if there is no active node, or 1 otherwise.
|
virtual |
Get the world orientation of the active node. Will return 0 if there is no active node, or 1 otherwise.
|
virtual |
Get the display position of the active node. Will return 0 if there is no active node, or 1 otherwise.
|
virtual |
Get the number of nodes.
|
virtual |
Get the nth node's display position. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting).
Reimplemented in vtkFocalPlaneContourRepresentation.
|
virtual |
Get the nth node's world position. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting).
Reimplemented in vtkFocalPlaneContourRepresentation.
|
virtual |
Get the nth node.
|
virtual |
Get the nth node's world orientation. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting).
|
virtual |
Set the nth node's display position. Display position will be converted into world position according to the constraints of the point placer. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting) or the world position is not valid.
|
virtual |
Set the nth node's display position. Display position will be converted into world position according to the constraints of the point placer. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting) or the world position is not valid.
|
virtual |
Set the nth node's display position. Display position will be converted into world position according to the constraints of the point placer. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting) or the world position is not valid.
|
virtual |
Set the nth node's world position. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting) or the world position is not valid according to the point placer.
|
virtual |
Set the nth node's world position. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting) or the world position is not valid according to the point placer.
|
virtual |
Get the nth node's slope. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting).
|
virtual |
|
virtual |
Get the world position of the intermediate point at index idx between nodes n and (n+1) (or n and 0 if n is the last node and the loop is closed). Returns 1 on success or 0 if n or idx are out of range.
Reimplemented in vtkFocalPlaneContourRepresentation.
|
virtual |
Add an intermediate point between node n and n+1 (or n and 0 if n is the last node and the loop is closed). Returns 1 on success or 0 if n is out of range.
|
virtual |
Add an intermediate point between node n and n+1 (or n and 0 if n is the last node and the loop is closed). Returns 1 on success or 0 if n is out of range. The added point is assigned a ptId as supplied.
|
virtual |
Delete the last node. Returns 1 on success or 0 if there were not any nodes.
|
virtual |
Delete the active node. Returns 1 on success or 0 if the active node did not indicate a valid node.
|
virtual |
Delete the nth node. Return 1 on success or 0 if n is out of range.
|
virtual |
Delete all nodes.
|
virtual |
Given a specific X, Y pixel location, add a new node on the contour at this location.
|
virtual |
The tolerance to use when calculations are performed in display coordinates
|
virtual |
The tolerance to use when calculations are performed in display coordinates
|
virtual |
The tolerance to use when calculations are performed in world coordinates
|
virtual |
The tolerance to use when calculations are performed in world coordinates
|
virtual |
Set / get the current operation. The widget is either inactive, or it is being translated.
|
virtual |
Set / get the current operation. The widget is either inactive, or it is being translated.
|
inline |
Set / get the current operation. The widget is either inactive, or it is being translated.
Definition at line 329 of file vtkContourRepresentation.h.
|
inline |
Set / get the current operation. The widget is either inactive, or it is being translated.
Definition at line 331 of file vtkContourRepresentation.h.
|
inline |
Set / get the current operation. The widget is either inactive, or it is being translated.
Definition at line 333 of file vtkContourRepresentation.h.
|
inline |
Set / get the current operation. The widget is either inactive, or it is being translated.
Definition at line 335 of file vtkContourRepresentation.h.
void vtkContourRepresentation::SetPointPlacer | ( | vtkPointPlacer * | ) |
|
virtual |
void vtkContourRepresentation::SetLineInterpolator | ( | vtkContourLineInterpolator * | ) |
Set / Get the Line Interpolator. The line interpolator is responsible for generating the line segments connecting nodes.
|
virtual |
Set / Get the Line Interpolator. The line interpolator is responsible for generating the line segments connecting nodes.
|
pure virtual |
These are methods that satisfy vtkWidgetRepresentation's API.
Implements vtkWidgetRepresentation.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
|
pure virtual |
These are methods that satisfy vtkWidgetRepresentation's API.
Reimplemented from vtkWidgetRepresentation.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
|
pure virtual |
These are methods that satisfy vtkWidgetRepresentation's API.
Reimplemented from vtkWidgetRepresentation.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
|
pure virtual |
These are methods that satisfy vtkWidgetRepresentation's API.
Reimplemented from vtkWidgetRepresentation.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
|
pure virtual |
Methods required by vtkProp superclass.
Reimplemented from vtkWidgetRepresentation.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
|
pure virtual |
Methods required by vtkProp superclass.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
|
pure virtual |
Methods required by vtkProp superclass.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
|
pure virtual |
Methods required by vtkProp superclass.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
|
pure virtual |
Methods required by vtkProp superclass.
Reimplemented from vtkWidgetRepresentation.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
void vtkContourRepresentation::SetClosedLoop | ( | int | val | ) |
Set / Get the ClosedLoop value. This ivar indicates whether the contour forms a closed loop.
|
virtual |
Set / Get the ClosedLoop value. This ivar indicates whether the contour forms a closed loop.
|
virtual |
Set / Get the ClosedLoop value. This ivar indicates whether the contour forms a closed loop.
|
virtual |
Set / Get the ClosedLoop value. This ivar indicates whether the contour forms a closed loop.
|
virtual |
A flag to indicate whether to show the Selected nodes Default is to set it to false.
Reimplemented in vtkOrientedGlyphContourRepresentation.
|
virtual |
A flag to indicate whether to show the Selected nodes Default is to set it to false.
|
virtual |
A flag to indicate whether to show the Selected nodes Default is to set it to false.
|
virtual |
A flag to indicate whether to show the Selected nodes Default is to set it to false.
|
pure virtual |
Get the points in this contour as a vtkPolyData.
Implemented in vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.
void vtkContourRepresentation::GetNodePolyData | ( | vtkPolyData * | poly | ) |
Get the nodes and not the intermediate points in this contour as a vtkPolyData.
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
Given a world position and orientation, this computes the display position using the renderer of this class.
|
protected |
Given a world position and orientation, this computes the display position using the renderer of this class.
|
protectedvirtual |
Reimplemented in vtkFocalPlaneContourRepresentation.
|
protected |
|
protectedvirtual |
|
protectedpure virtual |
Implemented in vtkOrientedGlyphContourRepresentation, and vtkOrientedGlyphFocalPlaneContourRepresentation.
|
protectedvirtual |
Reimplemented in vtkFocalPlaneContourRepresentation.
|
inlineprotected |
Definition at line 454 of file vtkContourRepresentation.h.
|
protectedvirtual |
Build a contour representation from externally supplied PolyData. This is very useful when you use an external program to compute a set of contour nodes, let's say based on image features. Subsequently, you want to build and display a contour that runs through those points. This method is protected and accessible only from vtkContourWidget::Initialize. The idlist here may be used to initialize a contour widget that uses a vtkPolygonalSurfacePointPlacer. This stores the point id's of the nodes, since the contour is drawn on the vertices of a surface mesh.
|
protectedvirtual |
Overloaded initialize method, that is called when the vtkIdList is NULL to mantain backwards compatibility.
|
protectedvirtual |
Internal implementation, delegated to another method, so that users who override the method Initialize that takes in one argument are supported.
|
protected |
Deletes the previous locator if it exists and creates a new locator. Also deletes / recreates the attached data set.
|
protected |
|
friend |
Definition at line 122 of file vtkContourRepresentation.h.
|
protected |
Definition at line 405 of file vtkContourRepresentation.h.
|
protected |
Definition at line 406 of file vtkContourRepresentation.h.
|
protected |
Definition at line 408 of file vtkContourRepresentation.h.
|
protected |
Definition at line 409 of file vtkContourRepresentation.h.
|
protected |
Definition at line 411 of file vtkContourRepresentation.h.
|
protected |
Definition at line 413 of file vtkContourRepresentation.h.
|
protected |
Definition at line 414 of file vtkContourRepresentation.h.
|
protected |
Definition at line 417 of file vtkContourRepresentation.h.
|
protected |
Definition at line 419 of file vtkContourRepresentation.h.
|
protected |
Definition at line 452 of file vtkContourRepresentation.h.
|
protected |
Adding a point locator to the representation to speed up lookup of the active node when dealing with large datasets (100k+)
Definition at line 483 of file vtkContourRepresentation.h.
|
protected |
Definition at line 491 of file vtkContourRepresentation.h.