VTK
vtkRectilinearWipeRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRectilinearWipeRepresentation.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 =========================================================================*/
41 #ifndef vtkRectilinearWipeRepresentation_h
42 #define vtkRectilinearWipeRepresentation_h
43 
44 #include "vtkInteractionWidgetsModule.h" // For export macro
46 
48 class vtkImageActor;
49 class vtkPoints;
50 class vtkCellArray;
51 class vtkPolyData;
52 class vtkProperty2D;
54 class vtkActor2D;
55 
56 
58 {
59 public:
62 
64 
66  void PrintSelf(ostream& os, vtkIndent indent);
68 
70 
74 
76 
77  void SetImageActor(vtkImageActor *imageActor);
80 
82 
85  vtkSetClampMacro(Tolerance,int,1,10);
86  vtkGetMacro(Tolerance,int);
88 
90 
94 
96 
99  virtual void BuildRepresentation();
100  virtual void StartWidgetInteraction(double eventPos[2]);
101  virtual void WidgetInteraction(double eventPos[2]);
102  virtual int ComputeInteractionState(int X, int Y, int modify=0);
104 
105 //BTX
106  // Enums define the state of the prop relative to the mouse pointer
107  // position. Used by ComputeInteractionState() to communicate with the
108  // widget.
110  {
111  Outside=0,
114  MovingCenter
115  };
116 //ETX
117 
119 
122  virtual int RenderOverlay(vtkViewport *viewport);
123  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
127 
128 protected:
131 
132  // Instances that this class manipulates
135 
136  // The pick tolerance of the widget in pixels
138 
139  // This is used to track the beginning of interaction with the prop
140  double StartWipePosition[2];
141 
142  // Indicates which part of widget is currently active based on the
143  // state of the instance of the vtkImageRectilinearWipe.
145 
146  // Geometric structure of widget
147  vtkPoints *Points; // The nine points defining the widget geometry
148  vtkCellArray *Lines; // lines defining the boundary
153 
154  // These are used to track the coordinates (in display coordinate system)
155  // of the mid-edge and center point of the widget
156  double DP4[3];
157  double DP5[3];
158  double DP6[3];
159  double DP7[3];
160  double DP8[3];
161 
162  int Dims[3]; // Dimensions of the input image to the wipe
163  int I; //the i-j define the plane that is being displayed
164  int J;
165 
166 private:
168  void operator=(const vtkRectilinearWipeRepresentation&); //Not implemented
169 };
170 
171 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkWidgetRepresentation.h
vtkRectilinearWipeRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:51
vtkRectilinearWipeRepresentation::WipeActor
vtkActor2D * WipeActor
Definition: vtkRectilinearWipeRepresentation.h:151
vtkRectilinearWipeRepresentation::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
vtkRectilinearWipeRepresentation
represent a vtkRectilinearWipeWidget
Definition: vtkRectilinearWipeRepresentation.h:58
vtkRectilinearWipeRepresentation::WidgetInteraction
virtual void WidgetInteraction(double eventPos[2])
vtkRectilinearWipeRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
vtkRectilinearWipeRepresentation::SetImageActor
void SetImageActor(vtkImageActor *imageActor)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:54
vtkImageRectilinearWipe
make a rectilinear combination of two images.
Definition: vtkImageRectilinearWipe.h:64
vtkInteractionWidgetsModule.h
vtkRectilinearWipeRepresentation::ActiveParts
int ActiveParts
Definition: vtkRectilinearWipeRepresentation.h:144
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkRectilinearWipeRepresentation::RectilinearWipe
vtkImageRectilinearWipe * RectilinearWipe
Definition: vtkRectilinearWipeRepresentation.h:133
vtkRectilinearWipeRepresentation::BuildRepresentation
virtual void BuildRepresentation()
vtkRectilinearWipeRepresentation::Points
vtkPoints * Points
Definition: vtkRectilinearWipeRepresentation.h:147
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkRectilinearWipeRepresentation::ImageActor
vtkImageActor * ImageActor
Definition: vtkRectilinearWipeRepresentation.h:134
vtkRectilinearWipeRepresentation::WipeMapper
vtkPolyDataMapper2D * WipeMapper
Definition: vtkRectilinearWipeRepresentation.h:150
vtkRectilinearWipeRepresentation::GetActors2D
virtual void GetActors2D(vtkPropCollection *)
vtkRectilinearWipeRepresentation::MovingHPane
@ MovingHPane
Definition: vtkRectilinearWipeRepresentation.h:112
vtkRectilinearWipeRepresentation::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRectilinearWipeRepresentation::New
static vtkRectilinearWipeRepresentation * New()
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkRectilinearWipeRepresentation::MovingVPane
@ MovingVPane
Definition: vtkRectilinearWipeRepresentation.h:113
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkRectilinearWipeRepresentation::Property
vtkProperty2D * Property
Definition: vtkRectilinearWipeRepresentation.h:152
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkRectilinearWipeRepresentation::_InteractionState
_InteractionState
Definition: vtkRectilinearWipeRepresentation.h:110
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:45
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
vtkRectilinearWipeRepresentation::J
int J
Definition: vtkRectilinearWipeRepresentation.h:164
vtkRectilinearWipeRepresentation::SetRectilinearWipe
void SetRectilinearWipe(vtkImageRectilinearWipe *wipe)
vtkRectilinearWipeRepresentation::I
int I
Definition: vtkRectilinearWipeRepresentation.h:163
vtkRectilinearWipeRepresentation::vtkRectilinearWipeRepresentation
vtkRectilinearWipeRepresentation()
vtkRectilinearWipeRepresentation::Lines
vtkCellArray * Lines
Definition: vtkRectilinearWipeRepresentation.h:148
vtkImageActor
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:49
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkRectilinearWipeRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkRectilinearWipeRepresentation::RenderOverlay
virtual int RenderOverlay(vtkViewport *viewport)
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkRectilinearWipeRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double eventPos[2])
vtkRectilinearWipeRepresentation::Wipe
vtkPolyData * Wipe
Definition: vtkRectilinearWipeRepresentation.h:149
vtkRectilinearWipeRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkRectilinearWipeRepresentation::~vtkRectilinearWipeRepresentation
~vtkRectilinearWipeRepresentation()
vtkRectilinearWipeRepresentation::Tolerance
int Tolerance
Definition: vtkRectilinearWipeRepresentation.h:137