FreeMat

- Main Page
- Related Pages

vtkFocalPlaneContourRepresentation

Section: Visualization Toolkit Widget Classes

# Usage

The contour will stay on the focal plane irrespective of camera position/orientation changes. The class was written in order to be able to draw contours on a volume widget and have the contours overlayed on the focal plane in order to do contour segmentation. The superclass, vtkContourRepresentation handles contours that are drawn in actual world position co-ordinates, so they would rotate with the camera position/ orientation changes

To create an instance of class vtkFocalPlaneContourRepresentation, simply invoke its constructor as follows

      obj = vtkFocalPlaneContourRepresentation

# Methods

The class vtkFocalPlaneContourRepresentation has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkFocalPlaneContourRepresentation class.

- `string = obj.GetClassName ()` - Standard VTK methods.
- `int = obj.IsA (string name)` - Standard VTK methods.
- `vtkFocalPlaneContourRepresentation = obj.NewInstance ()` - Standard VTK methods.
- `vtkFocalPlaneContourRepresentation = obj.SafeDownCast (vtkObject o)` - Standard VTK methods.
- `int = obj.GetIntermediatePointWorldPosition (int n, int idx, double point[3])` - 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.
- `int = obj.GetIntermediatePointDisplayPosition (int n, int idx, double point[3])` - 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.
- `int = obj.GetNthNodeDisplayPosition (int n, double pos[2])` - 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).
- `int = obj.GetNthNodeWorldPosition (int n, double pos[3])` - 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).
- `obj.UpdateContourWorldPositionsBasedOnDisplayPositions ()` - The class maintains its true contour locations based on display co-ords This method syncs the world co-ords data structure with the display co-ords.
- `int = obj.UpdateContour ()` - The method must be called whenever the contour needs to be updated, usually from RenderOpaqueGeometry()
- `obj.UpdateLines (int index)`