VTK
vtkOrientedGlyphFocalPlaneContourRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOrientedGlyphFocalPlaneContourRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkOrientedGlyphFocalPlaneContourRepresentation_h
31 #define vtkOrientedGlyphFocalPlaneContourRepresentation_h
32 
33 #include "vtkInteractionWidgetsModule.h" // For export macro
35 
36 class vtkProperty2D;
37 class vtkActor2D;
39 class vtkPolyData;
40 class vtkGlyph2D;
41 class vtkPoints;
42 class vtkPolyData;
43 
46 {
47 public:
50 
52 
55  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
62  void SetCursorShape(vtkPolyData *cursorShape);
65 
67 
70  void SetActiveCursorShape(vtkPolyData *activeShape);
73 
75 
79 
81 
85 
87 
90 
92 
95  virtual void SetRenderer(vtkRenderer *ren);
96  virtual void BuildRepresentation();
97  virtual void StartWidgetInteraction(double eventPos[2]);
98  virtual void WidgetInteraction(double eventPos[2]);
99  virtual int ComputeInteractionState(int X, int Y, int modified=0);
101 
103 
106  virtual int RenderOverlay(vtkViewport *viewport);
107  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
111 
114 
121 
122 protected:
125 
126  // Render the cursor
139 
140  // The polydata represents the contour in display co-ordinates.
144 
145  // The polydata represents the contour in world coordinates. It is updated
146  // (kept in sync with Lines) every time the GetContourRepresentationAsPolyData()
147  // method is called.
149 
150  // Support picking
151  double LastPickPosition[3];
152  double LastEventPosition[2];
153 
154  // Methods to manipulate the cursor
155  void Translate(double eventPos[2]);
156  void Scale(double eventPos[2]);
157  void ShiftContour(double eventPos[2]);
158  void ScaleContour(double eventPos[2]);
159 
160  void ComputeCentroid(double* ioCentroid);
161 
162  // Properties used to control the appearance of selected objects and
163  // the manipulator in general.
167 
169 
171 
172 
173  // Distance between where the mouse event happens and where the
174  // widget is focused - maintain this distance during interaction.
175  double InteractionOffset[2];
176 
177  void BuildLines();
178 
179 private:
181  void operator=(const vtkOrientedGlyphFocalPlaneContourRepresentation&); //Not implemented
182 };
183 
184 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkOrientedGlyphFocalPlaneContourRepresentation::New
static vtkOrientedGlyphFocalPlaneContourRepresentation * New()
vtkFocalPlaneContourRepresentation.h
vtkOrientedGlyphFocalPlaneContourRepresentation::CreateDefaultProperties
void CreateDefaultProperties()
vtkOrientedGlyphFocalPlaneContourRepresentation::CursorShape
vtkPolyData * CursorShape
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:133
vtkOrientedGlyphFocalPlaneContourRepresentation::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:51
vtkOrientedGlyphFocalPlaneContourRepresentation::Mapper
vtkPolyDataMapper2D * Mapper
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:128
vtkOrientedGlyphFocalPlaneContourRepresentation::Property
vtkProperty2D * Property
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:164
vtkOrientedGlyphFocalPlaneContourRepresentation::BuildLines
void BuildLines()
vtkOrientedGlyphFocalPlaneContourRepresentation::SetActiveCursorShape
void SetActiveCursorShape(vtkPolyData *activeShape)
vtkOrientedGlyphFocalPlaneContourRepresentation::ComputeCentroid
void ComputeCentroid(double *ioCentroid)
vtkOrientedGlyphFocalPlaneContourRepresentation::Lines
vtkPolyData * Lines
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:141
vtkFocalPlaneContourRepresentation
represent a contour drawn on the focal plane.
Definition: vtkFocalPlaneContourRepresentation.h:41
vtkOrientedGlyphFocalPlaneContourRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkOrientedGlyphFocalPlaneContourRepresentation::LinesWorldCoordinates
vtkPolyData * LinesWorldCoordinates
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:148
vtkOrientedGlyphFocalPlaneContourRepresentation::LinesMapper
vtkPolyDataMapper2D * LinesMapper
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:142
vtkOrientedGlyphFocalPlaneContourRepresentation::vtkOrientedGlyphFocalPlaneContourRepresentation
vtkOrientedGlyphFocalPlaneContourRepresentation()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkOrientedGlyphFocalPlaneContourRepresentation::FocalPoint
vtkPoints * FocalPoint
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:136
vtkGlyph2D
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:39
vtkInteractionWidgetsModule.h
vtkOrientedGlyphFocalPlaneContourRepresentation::ScaleContour
void ScaleContour(double eventPos[2])
vtkOrientedGlyphFocalPlaneContourRepresentation::WidgetInteraction
virtual void WidgetInteraction(double eventPos[2])
vtkOrientedGlyphFocalPlaneContourRepresentation::ActiveProperty
vtkProperty2D * ActiveProperty
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:165
vtkOrientedGlyphFocalPlaneContourRepresentation::ActiveMapper
vtkPolyDataMapper2D * ActiveMapper
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:131
vtkOrientedGlyphFocalPlaneContourRepresentation::GetActiveCursorShape
vtkPolyData * GetActiveCursorShape()
vtkOrientedGlyphFocalPlaneContourRepresentation::GetContourPlaneDirectionCosines
vtkMatrix4x4 * GetContourPlaneDirectionCosines(const double origin[3])
vtkOrientedGlyphFocalPlaneContourRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkOrientedGlyphFocalPlaneContourRepresentation::SetCursorShape
void SetCursorShape(vtkPolyData *cursorShape)
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkOrientedGlyphFocalPlaneContourRepresentation::LinesActor
vtkActor2D * LinesActor
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:143
vtkOrientedGlyphFocalPlaneContourRepresentation::LinesProperty
vtkProperty2D * LinesProperty
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:166
vtkOrientedGlyphFocalPlaneContourRepresentation::ActiveActor
vtkActor2D * ActiveActor
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:130
vtkOrientedGlyphFocalPlaneContourRepresentation::ShiftContour
void ShiftContour(double eventPos[2])
vtkOrientedGlyphFocalPlaneContourRepresentation::Scale
void Scale(double eventPos[2])
vtkOrientedGlyphFocalPlaneContourRepresentation::GetCursorShape
vtkPolyData * GetCursorShape()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:39
vtkOrientedGlyphFocalPlaneContourRepresentation::GetActors2D
virtual void GetActors2D(vtkPropCollection *)
vtkOrientedGlyphFocalPlaneContourRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkOrientedGlyphFocalPlaneContourRepresentation::~vtkOrientedGlyphFocalPlaneContourRepresentation
~vtkOrientedGlyphFocalPlaneContourRepresentation()
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
vtkOrientedGlyphFocalPlaneContourRepresentation::SetRenderer
virtual void SetRenderer(vtkRenderer *ren)
vtkOrientedGlyphFocalPlaneContourRepresentation
Contours constrained to a focal plane.
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:46
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkOrientedGlyphFocalPlaneContourRepresentation::BuildRepresentation
virtual void BuildRepresentation()
vtkOrientedGlyphFocalPlaneContourRepresentation::ActiveFocalPoint
vtkPoints * ActiveFocalPoint
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:138
vtkOrientedGlyphFocalPlaneContourRepresentation::GetContourRepresentationAsPolyData
virtual vtkPolyData * GetContourRepresentationAsPolyData()
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
vtkOrientedGlyphFocalPlaneContourRepresentation::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
vtkOrientedGlyphFocalPlaneContourRepresentation::ActiveGlypher
vtkGlyph2D * ActiveGlypher
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:132
vtkOrientedGlyphFocalPlaneContourRepresentation::RenderOverlay
virtual int RenderOverlay(vtkViewport *viewport)
vtkOrientedGlyphFocalPlaneContourRepresentation::Translate
void Translate(double eventPos[2])
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkOrientedGlyphFocalPlaneContourRepresentation::FocalData
vtkPolyData * FocalData
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:135
vtkOrientedGlyphFocalPlaneContourRepresentation::Glypher
vtkGlyph2D * Glypher
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:129
vtkOrientedGlyphFocalPlaneContourRepresentation::Actor
vtkActor2D * Actor
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:127
vtkOrientedGlyphFocalPlaneContourRepresentation::ActiveCursorShape
vtkPolyData * ActiveCursorShape
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:134
vtkOrientedGlyphFocalPlaneContourRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double eventPos[2])
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkOrientedGlyphFocalPlaneContourRepresentation::ContourPlaneDirectionCosines
vtkMatrix4x4 * ContourPlaneDirectionCosines
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:168
vtkOrientedGlyphFocalPlaneContourRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modified=0)
vtkOrientedGlyphFocalPlaneContourRepresentation::ActiveFocalData
vtkPolyData * ActiveFocalData
Definition: vtkOrientedGlyphFocalPlaneContourRepresentation.h:137