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
00059 class vtkAlgorithmOutput;
00060 class vtkImageActor;
00061 class vtkImageData;
00062 class vtkImageMapToWindowLevelColors2;
00063 class vtkInteractorStyleImage;
00064 class vtkRenderWindow;
00065 class vtkRenderer;
00066 class vtkRenderWindowInteractor;
00067 class vtkPolyData;
00068
00069 class VTK_EXPORT vtkImageColorViewer : public vtkObject
00070 {
00071 public:
00072 static vtkImageColorViewer *New();
00073 vtkTypeRevisionMacro(vtkImageColorViewer,vtkObject);
00074 void PrintSelf(ostream& os, vtkIndent indent);
00075
00076
00077
00078 virtual const char *GetWindowName();
00079
00080
00081
00082 virtual void Render(void);
00083
00084
00085
00086 virtual void SetInput(vtkImageData *in);
00087 virtual vtkImageData *GetInput();
00088 virtual void SetInputConnection(vtkAlgorithmOutput* input);
00089 virtual void AddInputConnection(vtkAlgorithmOutput* input);
00090 virtual void AddInput(vtkImageData * input);
00091
00092
00093 double GetOverlayVisibility();
00094 void SetOverlayVisibility(double vis);
00095
00096
00097
00098
00099 enum
00100 {
00101 SLICE_ORIENTATION_YZ = 0,
00102 SLICE_ORIENTATION_XZ = 1,
00103 SLICE_ORIENTATION_XY = 2
00104 };
00105
00106 vtkGetMacro(SliceOrientation, int);
00107 virtual void SetSliceOrientation(int orientation);
00108 virtual void SetSliceOrientationToXY()
00109 { this->SetSliceOrientation(vtkImageColorViewer::SLICE_ORIENTATION_XY); };
00110 virtual void SetSliceOrientationToYZ()
00111 { this->SetSliceOrientation(vtkImageColorViewer::SLICE_ORIENTATION_YZ); };
00112 virtual void SetSliceOrientationToXZ()
00113 { this->SetSliceOrientation(vtkImageColorViewer::SLICE_ORIENTATION_XZ); };
00114
00115
00116
00117
00118 vtkGetMacro(Slice, int);
00119 virtual void SetSlice(int s);
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132 virtual void UpdateDisplayExtent();
00133
00134
00135
00136
00137 virtual int GetSliceMin();
00138 virtual int GetSliceMax();
00139 virtual void GetSliceRange(int range[2])
00140 { this->GetSliceRange(range[0], range[1]); }
00141 virtual void GetSliceRange(int &min, int &max);
00142 virtual int* GetSliceRange();
00143
00144
00145
00146 virtual double GetColorWindow();
00147 virtual double GetColorLevel();
00148 virtual void SetColorWindow(double s);
00149 virtual void SetColorLevel(double s);
00150
00151
00152
00153 virtual void SetDisplayId(void *a);
00154 virtual void SetWindowId(void *a);
00155 virtual void SetParentId(void *a);
00156
00157
00158
00159 virtual int* GetPosition();
00160 virtual void SetPosition(int a,int b);
00161 virtual void SetPosition(int a[2]) { this->SetPosition(a[0],a[1]); }
00162
00163
00164
00165 virtual int* GetSize();
00166 virtual void SetSize(int a, int b);
00167 virtual void SetSize(int a[2]) { this->SetSize(a[0],a[1]); }
00168
00169
00170
00171
00172 vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
00173 vtkGetObjectMacro(Renderer, vtkRenderer);
00174 vtkGetObjectMacro(ImageActor,vtkImageActor);
00175 vtkGetObjectMacro(WindowLevel,vtkImageMapToWindowLevelColors2);
00176 vtkGetObjectMacro(InteractorStyle,vtkInteractorStyleImage);
00177
00178
00179
00180 virtual void SetRenderWindow(vtkRenderWindow *arg);
00181 virtual void SetRenderer(vtkRenderer *arg);
00182
00183
00184
00185 virtual void SetupInteractor(vtkRenderWindowInteractor*);
00186
00187
00188
00189
00190
00191 virtual void SetOffScreenRendering(int);
00192 virtual int GetOffScreenRendering();
00193 vtkBooleanMacro(OffScreenRendering,int);
00194
00195
00196
00197 VTK_LEGACY(int GetWholeZMin());
00198
00199
00200
00201 VTK_LEGACY(int GetWholeZMax());
00202
00203
00204
00205 VTK_LEGACY(int GetZSlice());
00206
00207
00208
00209 VTK_LEGACY(void SetZSlice(int));
00210
00211 protected:
00212 vtkImageColorViewer();
00213 ~vtkImageColorViewer();
00214
00215 virtual void InstallPipeline();
00216 virtual void UnInstallPipeline();
00217
00218 vtkImageMapToWindowLevelColors2 *WindowLevel;
00219 vtkRenderWindow *RenderWindow;
00220 vtkRenderer *Renderer;
00221 vtkImageActor *ImageActor;
00222 vtkImageActor *OverlayImageActor;
00223 vtkRenderWindowInteractor *Interactor;
00224 vtkInteractorStyleImage *InteractorStyle;
00225
00226 int SliceOrientation;
00227 int FirstRender;
00228 int Slice;
00229
00230 virtual void UpdateOrientation();
00231
00232 private:
00233 vtkImageColorViewer(const vtkImageColorViewer&);
00234 void operator=(const vtkImageColorViewer&);
00235 };
00236
00237 #endif
00238
00239