vtkImageColorViewer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef __vtkImageColorViewer_h
00055 #define __vtkImageColorViewer_h
00056
00057 #include "vtkObject.h"
00058 #include "gdcmTypes.h"
00059
00060 class vtkAlgorithmOutput;
00061 class vtkImageActor;
00062 class vtkImageData;
00063 class vtkImageMapToWindowLevelColors2;
00064 class vtkInteractorStyleImage;
00065 class vtkRenderWindow;
00066 class vtkRenderer;
00067 class vtkRenderWindowInteractor;
00068 class vtkPolyData;
00069
00070 class GDCM_EXPORT vtkImageColorViewer : public vtkObject
00071 {
00072 public:
00073 static vtkImageColorViewer *New();
00074 vtkTypeRevisionMacro(vtkImageColorViewer,vtkObject);
00075 void PrintSelf(ostream& os, vtkIndent indent);
00076
00077
00078
00079 virtual const char *GetWindowName();
00080
00081
00082
00083 virtual void Render(void);
00084
00085
00086
00087 virtual void SetInput(vtkImageData *in);
00088 virtual vtkImageData *GetInput();
00089 virtual void SetInputConnection(vtkAlgorithmOutput* input);
00090 virtual void AddInputConnection(vtkAlgorithmOutput* input);
00091 virtual void AddInput(vtkImageData * input);
00092
00093
00094 double GetOverlayVisibility();
00095 void SetOverlayVisibility(double vis);
00096
00097
00098
00099
00100 enum
00101 {
00102 SLICE_ORIENTATION_YZ = 0,
00103 SLICE_ORIENTATION_XZ = 1,
00104 SLICE_ORIENTATION_XY = 2
00105 };
00106
00107 vtkGetMacro(SliceOrientation, int);
00108 virtual void SetSliceOrientation(int orientation);
00109 virtual void SetSliceOrientationToXY()
00110 { this->SetSliceOrientation(vtkImageColorViewer::SLICE_ORIENTATION_XY); };
00111 virtual void SetSliceOrientationToYZ()
00112 { this->SetSliceOrientation(vtkImageColorViewer::SLICE_ORIENTATION_YZ); };
00113 virtual void SetSliceOrientationToXZ()
00114 { this->SetSliceOrientation(vtkImageColorViewer::SLICE_ORIENTATION_XZ); };
00115
00116
00117
00118
00119 vtkGetMacro(Slice, int);
00120 virtual void SetSlice(int s);
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 virtual void UpdateDisplayExtent();
00134
00135
00136
00137
00138 virtual int GetSliceMin();
00139 virtual int GetSliceMax();
00140 virtual void GetSliceRange(int range[2])
00141 { this->GetSliceRange(range[0], range[1]); }
00142 virtual void GetSliceRange(int &min, int &max);
00143 virtual int* GetSliceRange();
00144
00145
00146
00147 virtual double GetColorWindow();
00148 virtual double GetColorLevel();
00149 virtual void SetColorWindow(double s);
00150 virtual void SetColorLevel(double s);
00151
00152
00153
00154 virtual void SetDisplayId(void *a);
00155 virtual void SetWindowId(void *a);
00156 virtual void SetParentId(void *a);
00157
00158
00159
00160 virtual int* GetPosition();
00161 virtual void SetPosition(int a,int b);
00162 virtual void SetPosition(int a[2]) { this->SetPosition(a[0],a[1]); }
00163
00164
00165
00166 virtual int* GetSize();
00167 virtual void SetSize(int a, int b);
00168 virtual void SetSize(int a[2]) { this->SetSize(a[0],a[1]); }
00169
00170
00171
00172
00173 vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
00174 vtkGetObjectMacro(Renderer, vtkRenderer);
00175 vtkGetObjectMacro(ImageActor,vtkImageActor);
00176 vtkGetObjectMacro(WindowLevel,vtkImageMapToWindowLevelColors2);
00177 vtkGetObjectMacro(InteractorStyle,vtkInteractorStyleImage);
00178
00179
00180
00181 virtual void SetRenderWindow(vtkRenderWindow *arg);
00182 virtual void SetRenderer(vtkRenderer *arg);
00183
00184
00185
00186 virtual void SetupInteractor(vtkRenderWindowInteractor*);
00187
00188
00189
00190
00191
00192 virtual void SetOffScreenRendering(int);
00193 virtual int GetOffScreenRendering();
00194 vtkBooleanMacro(OffScreenRendering,int);
00195
00196
00197
00198 VTK_LEGACY(int GetWholeZMin());
00199
00200
00201
00202 VTK_LEGACY(int GetWholeZMax());
00203
00204
00205
00206 VTK_LEGACY(int GetZSlice());
00207
00208
00209
00210 VTK_LEGACY(void SetZSlice(int));
00211
00212 protected:
00213 vtkImageColorViewer();
00214 ~vtkImageColorViewer();
00215
00216 virtual void InstallPipeline();
00217 virtual void UnInstallPipeline();
00218
00219 vtkImageMapToWindowLevelColors2 *WindowLevel;
00220 vtkRenderWindow *RenderWindow;
00221 vtkRenderer *Renderer;
00222 vtkImageActor *ImageActor;
00223 vtkImageActor *OverlayImageActor;
00224 vtkRenderWindowInteractor *Interactor;
00225 vtkInteractorStyleImage *InteractorStyle;
00226
00227 int SliceOrientation;
00228 int FirstRender;
00229 int Slice;
00230
00231 virtual void UpdateOrientation();
00232
00233 private:
00234 vtkImageColorViewer(const vtkImageColorViewer&);
00235 void operator=(const vtkImageColorViewer&);
00236 };
00237
00238 #endif
00239
00240