VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkResliceImageViewer.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00035 #ifndef __vtkResliceImageViewer_h 00036 #define __vtkResliceImageViewer_h 00037 00038 #include "vtkImageViewer2.h" 00039 00040 class vtkResliceCursorWidget; 00041 class vtkResliceCursor; 00042 class vtkScalarsToColors; 00043 class vtkBoundedPlanePointPlacer; 00044 class vtkResliceImageViewerMeasurements; 00045 class vtkResliceImageViewerScrollCallback; 00046 class vtkPlane; 00047 00048 class VTK_WIDGETS_EXPORT vtkResliceImageViewer : public vtkImageViewer2 00049 { 00050 public: 00051 00053 00054 static vtkResliceImageViewer *New(); 00055 vtkTypeMacro(vtkResliceImageViewer,vtkImageViewer2); 00056 void PrintSelf(ostream& os, vtkIndent indent); 00058 00060 virtual void Render(); 00061 00063 00064 virtual void SetInput(vtkImageData *in); 00065 virtual void SetInputConnection(vtkAlgorithmOutput* input); 00067 00069 00070 virtual void SetColorWindow(double s); 00071 virtual void SetColorLevel(double s); 00073 00075 00077 vtkGetObjectMacro(ResliceCursorWidget,vtkResliceCursorWidget); 00079 00081 00082 enum 00083 { 00084 RESLICE_AXIS_ALIGNED = 0, 00085 RESLICE_OBLIQUE = 1 00086 }; 00087 //ETX 00089 00090 vtkGetMacro(ResliceMode, int); 00091 virtual void SetResliceMode(int resliceMode); 00092 virtual void SetResliceModeToAxisAligned() 00093 { this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED); }; 00094 virtual void SetResliceModeToOblique() 00095 { this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE); }; 00096 00098 00099 vtkResliceCursor * GetResliceCursor(); 00100 void SetResliceCursor( vtkResliceCursor * rc ); 00102 00104 00105 virtual void SetLookupTable( vtkScalarsToColors * ); 00106 vtkScalarsToColors * GetLookupTable(); 00108 00110 00111 virtual void SetThickMode( int ); 00112 virtual int GetThickMode(); 00114 00116 virtual void Reset(); 00117 00119 00120 vtkGetObjectMacro( PointPlacer, vtkBoundedPlanePointPlacer ); 00122 00124 00125 vtkGetObjectMacro( Measurements, vtkResliceImageViewerMeasurements ); 00127 00129 00130 vtkGetObjectMacro( Interactor, vtkRenderWindowInteractor ); 00132 00134 00138 vtkSetMacro( SliceScrollOnMouseWheel, int ); 00139 vtkGetMacro( SliceScrollOnMouseWheel, int ); 00140 vtkBooleanMacro( SliceScrollOnMouseWheel, int ); 00142 00144 virtual void IncrementSlice( int n ); 00145 00146 enum { SliceChangedEvent = 1001 }; 00147 00148 protected: 00149 vtkResliceImageViewer(); 00150 ~vtkResliceImageViewer(); 00151 00152 virtual void InstallPipeline(); 00153 virtual void UnInstallPipeline(); 00154 virtual void UpdateOrientation(); 00155 virtual void UpdateDisplayExtent(); 00156 virtual void UpdatePointPlacer(); 00157 00159 00161 vtkPlane * GetReslicePlane(); 00162 double GetInterSliceSpacingInResliceMode(); 00164 00165 vtkResliceCursorWidget * ResliceCursorWidget; 00166 vtkBoundedPlanePointPlacer * PointPlacer; 00167 int ResliceMode; 00168 vtkResliceImageViewerMeasurements * Measurements; 00169 int SliceScrollOnMouseWheel; 00170 vtkResliceImageViewerScrollCallback * ScrollCallback; 00171 00172 private: 00173 vtkResliceImageViewer(const vtkResliceImageViewer&); // Not implemented. 00174 void operator=(const vtkResliceImageViewer&); // Not implemented. 00175 }; 00176 00177 #endif