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 "vtkInteractionImageModule.h" // For export macro 00039 #include "vtkImageViewer2.h" 00040 00041 class vtkResliceCursorWidget; 00042 class vtkResliceCursor; 00043 class vtkScalarsToColors; 00044 class vtkBoundedPlanePointPlacer; 00045 class vtkResliceImageViewerMeasurements; 00046 class vtkResliceImageViewerScrollCallback; 00047 class vtkPlane; 00048 00049 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewer : public vtkImageViewer2 00050 { 00051 public: 00052 00054 00055 static vtkResliceImageViewer *New(); 00056 vtkTypeMacro(vtkResliceImageViewer,vtkImageViewer2); 00057 void PrintSelf(ostream& os, vtkIndent indent); 00059 00061 virtual void Render(); 00062 00064 00065 virtual void SetInputData(vtkImageData *in); 00066 virtual void SetInputConnection(vtkAlgorithmOutput* input); 00068 00070 00071 virtual void SetColorWindow(double s); 00072 virtual void SetColorLevel(double s); 00074 00076 00078 vtkGetObjectMacro(ResliceCursorWidget,vtkResliceCursorWidget); 00080 00082 00083 enum 00084 { 00085 RESLICE_AXIS_ALIGNED = 0, 00086 RESLICE_OBLIQUE = 1 00087 }; 00088 //ETX 00090 00091 vtkGetMacro(ResliceMode, int); 00092 virtual void SetResliceMode(int resliceMode); 00093 virtual void SetResliceModeToAxisAligned() 00094 { this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED); }; 00095 virtual void SetResliceModeToOblique() 00096 { this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE); }; 00097 00099 00100 vtkResliceCursor * GetResliceCursor(); 00101 void SetResliceCursor( vtkResliceCursor * rc ); 00103 00105 00106 virtual void SetLookupTable( vtkScalarsToColors * ); 00107 vtkScalarsToColors * GetLookupTable(); 00109 00111 00112 virtual void SetThickMode( int ); 00113 virtual int GetThickMode(); 00115 00117 virtual void Reset(); 00118 00120 00121 vtkGetObjectMacro( PointPlacer, vtkBoundedPlanePointPlacer ); 00123 00125 00126 vtkGetObjectMacro( Measurements, vtkResliceImageViewerMeasurements ); 00128 00130 00131 vtkGetObjectMacro( Interactor, vtkRenderWindowInteractor ); 00133 00135 00139 vtkSetMacro( SliceScrollOnMouseWheel, int ); 00140 vtkGetMacro( SliceScrollOnMouseWheel, int ); 00141 vtkBooleanMacro( SliceScrollOnMouseWheel, int ); 00143 00145 virtual void IncrementSlice( int n ); 00146 00147 enum { SliceChangedEvent = 1001 }; 00148 00149 protected: 00150 vtkResliceImageViewer(); 00151 ~vtkResliceImageViewer(); 00152 00153 virtual void InstallPipeline(); 00154 virtual void UnInstallPipeline(); 00155 virtual void UpdateOrientation(); 00156 virtual void UpdateDisplayExtent(); 00157 virtual void UpdatePointPlacer(); 00158 00160 00162 vtkPlane * GetReslicePlane(); 00163 double GetInterSliceSpacingInResliceMode(); 00165 00166 vtkResliceCursorWidget * ResliceCursorWidget; 00167 vtkBoundedPlanePointPlacer * PointPlacer; 00168 int ResliceMode; 00169 vtkResliceImageViewerMeasurements * Measurements; 00170 int SliceScrollOnMouseWheel; 00171 vtkResliceImageViewerScrollCallback * ScrollCallback; 00172 00173 private: 00174 vtkResliceImageViewer(const vtkResliceImageViewer&); // Not implemented. 00175 void operator=(const vtkResliceImageViewer&); // Not implemented. 00176 }; 00177 00178 #endif