00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00041 #ifndef __vtkRectilinearWipeRepresentation_h
00042 #define __vtkRectilinearWipeRepresentation_h
00043
00044 #include "vtkWidgetRepresentation.h"
00045
00046 class vtkImageRectilinearWipe;
00047 class vtkImageActor;
00048 class vtkPoints;
00049 class vtkCellArray;
00050 class vtkPolyData;
00051 class vtkProperty2D;
00052 class vtkPolyDataMapper2D;
00053 class vtkActor2D;
00054
00055
00056 class VTK_WIDGETS_EXPORT vtkRectilinearWipeRepresentation : public vtkWidgetRepresentation
00057 {
00058 public:
00060 static vtkRectilinearWipeRepresentation *New();
00061
00063
00064 vtkTypeMacro(vtkRectilinearWipeRepresentation,vtkWidgetRepresentation);
00065 void PrintSelf(ostream& os, vtkIndent indent);
00067
00069
00070 void SetRectilinearWipe(vtkImageRectilinearWipe *wipe);
00071 vtkGetObjectMacro(RectilinearWipe,vtkImageRectilinearWipe);
00073
00075
00076 void SetImageActor(vtkImageActor *imageActor);
00077 vtkGetObjectMacro(ImageActor,vtkImageActor);
00079
00081
00084 vtkSetClampMacro(Tolerance,int,1,10);
00085 vtkGetMacro(Tolerance,int);
00087
00089
00091 vtkGetObjectMacro(Property,vtkProperty2D);
00093
00095
00098 virtual void BuildRepresentation();
00099 virtual void StartWidgetInteraction(double eventPos[2]);
00100 virtual void WidgetInteraction(double eventPos[2]);
00101 virtual int ComputeInteractionState(int X, int Y, int modify=0);
00103
00104
00105
00106
00107
00108 enum _InteractionState
00109 {
00110 Outside=0,
00111 MovingHPane,
00112 MovingVPane,
00113 MovingCenter
00114 };
00115
00116
00118
00119 virtual void GetActors2D(vtkPropCollection *);
00120 virtual void ReleaseGraphicsResources(vtkWindow *);
00121 virtual int RenderOverlay(vtkViewport *viewport);
00122 virtual int RenderOpaqueGeometry(vtkViewport *viewport);
00123 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
00124 virtual int HasTranslucentPolygonalGeometry();
00126
00127 protected:
00128 vtkRectilinearWipeRepresentation();
00129 ~vtkRectilinearWipeRepresentation();
00130
00131
00132 vtkImageRectilinearWipe *RectilinearWipe;
00133 vtkImageActor *ImageActor;
00134
00135
00136 int Tolerance;
00137
00138
00139 double StartWipePosition[2];
00140
00141
00142
00143 int ActiveParts;
00144
00145
00146 vtkPoints *Points;
00147 vtkCellArray *Lines;
00148 vtkPolyData *Wipe;
00149 vtkPolyDataMapper2D *WipeMapper;
00150 vtkActor2D *WipeActor;
00151 vtkProperty2D *Property;
00152
00153
00154
00155 double DP4[3];
00156 double DP5[3];
00157 double DP6[3];
00158 double DP7[3];
00159 double DP8[3];
00160
00161 int Dims[3];
00162 int I;
00163 int J;
00164
00165 private:
00166 vtkRectilinearWipeRepresentation(const vtkRectilinearWipeRepresentation&);
00167 void operator=(const vtkRectilinearWipeRepresentation&);
00168 };
00169
00170 #endif