00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef __vtkCheckerboardRepresentation_h
00035 #define __vtkCheckerboardRepresentation_h
00036
00037 #include "vtkWidgetRepresentation.h"
00038
00039 class vtkImageCheckerboard;
00040 class vtkImageActor;
00041 class vtkSliderRepresentation3D;
00042
00043
00044 class VTK_WIDGETS_EXPORT vtkCheckerboardRepresentation : public vtkWidgetRepresentation
00045 {
00046 public:
00048 static vtkCheckerboardRepresentation *New();
00049
00051
00052 vtkTypeMacro(vtkCheckerboardRepresentation,vtkWidgetRepresentation);
00053 void PrintSelf(ostream& os, vtkIndent indent);
00055
00057
00058 void SetCheckerboard(vtkImageCheckerboard *chkrbrd);
00059 vtkGetObjectMacro(Checkerboard,vtkImageCheckerboard);
00061
00063
00064 void SetImageActor(vtkImageActor *imageActor);
00065 vtkGetObjectMacro(ImageActor,vtkImageActor);
00067
00069
00072 vtkSetClampMacro(CornerOffset,double,0.0,0.4);
00073 vtkGetMacro(CornerOffset,double);
00075
00076
00077 enum {
00078 TopSlider=0,
00079 RightSlider,
00080 BottomSlider,
00081 LeftSlider
00082 };
00083
00084
00087 void SliderValueChanged(int sliderNum);
00088
00090
00093 void SetTopRepresentation(vtkSliderRepresentation3D*);
00094 void SetRightRepresentation(vtkSliderRepresentation3D*);
00095 void SetBottomRepresentation(vtkSliderRepresentation3D*);
00096 void SetLeftRepresentation(vtkSliderRepresentation3D*);
00097 vtkGetObjectMacro(TopRepresentation,vtkSliderRepresentation3D);
00098 vtkGetObjectMacro(RightRepresentation,vtkSliderRepresentation3D);
00099 vtkGetObjectMacro(BottomRepresentation,vtkSliderRepresentation3D);
00100 vtkGetObjectMacro(LeftRepresentation,vtkSliderRepresentation3D);
00102
00104
00105 virtual void BuildRepresentation();
00106 virtual void GetActors(vtkPropCollection*);
00107 virtual void ReleaseGraphicsResources(vtkWindow *w);
00108 virtual int RenderOverlay(vtkViewport *viewport);
00109 virtual int RenderOpaqueGeometry(vtkViewport *viewport);
00110 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
00111 virtual int HasTranslucentPolygonalGeometry();
00113
00114 protected:
00115 vtkCheckerboardRepresentation();
00116 ~vtkCheckerboardRepresentation();
00117
00118
00119 vtkImageCheckerboard *Checkerboard;
00120 vtkImageActor *ImageActor;
00121
00122
00123 vtkSliderRepresentation3D *TopRepresentation;
00124 vtkSliderRepresentation3D *RightRepresentation;
00125 vtkSliderRepresentation3D *BottomRepresentation;
00126 vtkSliderRepresentation3D *LeftRepresentation;
00127
00128
00129 double CornerOffset;
00130
00131
00132 int OrthoAxis;
00133
00134 private:
00135 vtkCheckerboardRepresentation(const vtkCheckerboardRepresentation&);
00136 void operator=(const vtkCheckerboardRepresentation&);
00137 };
00138
00139 #endif