forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkFocalPlaneContourRepresentation.h
108 lines (89 loc) · 3.61 KB
/
vtkFocalPlaneContourRepresentation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*=========================================================================
Program: Visualization Toolkit
Module: vtkFocalPlaneContourRepresentation.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkFocalPlaneContourRepresentation
* @brief represent a contour drawn on the
* focal plane.
*
*
* 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
*
* @sa
* vtkContourWidget vtkHandleRepresentation vtkContourRepresentation
*/
#ifndef vtkFocalPlaneContourRepresentation_h
#define vtkFocalPlaneContourRepresentation_h
#include "vtkInteractionWidgetsModule.h" // For export macro
#include "vtkContourRepresentation.h"
class vtkHandleRepresentation;
class VTKINTERACTIONWIDGETS_EXPORT vtkFocalPlaneContourRepresentation : public vtkContourRepresentation
{
public:
//@{
/**
* Standard VTK methods.
*/
vtkTypeMacro(vtkFocalPlaneContourRepresentation,vtkContourRepresentation);
void PrintSelf(ostream& os, vtkIndent indent);
//@}
/**
* 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.
*/
virtual int 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.
*/
virtual int GetIntermediatePointDisplayPosition( int n,
int idx, double point[3] );
/**
* 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).
*/
virtual int GetNthNodeDisplayPosition( int n, double pos[2] );
/**
* 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).
*/
virtual int GetNthNodeWorldPosition( int n, double pos[3] );
/**
* 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.
*/
virtual void UpdateContourWorldPositionsBasedOnDisplayPositions();
/**
* The method must be called whenever the contour needs to be updated, usually
* from RenderOpaqueGeometry()
*/
virtual int UpdateContour();
virtual void UpdateLines( int index );
protected:
vtkFocalPlaneContourRepresentation();
~vtkFocalPlaneContourRepresentation();
private:
vtkFocalPlaneContourRepresentation(const vtkFocalPlaneContourRepresentation&) VTK_DELETE_FUNCTION;
void operator=(const vtkFocalPlaneContourRepresentation&) VTK_DELETE_FUNCTION;
};
#endif