VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkResliceCursor.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 =========================================================================*/ 00034 #ifndef __vtkResliceCursor_h 00035 #define __vtkResliceCursor_h 00036 00037 #include "vtkObject.h" 00038 00039 class vtkImageData; 00040 class vtkPolyData; 00041 class vtkPlane; 00042 class vtkPlaneCollection; 00043 00044 class VTK_GRAPHICS_EXPORT vtkResliceCursor : public vtkObject 00045 { 00046 public: 00047 vtkTypeMacro(vtkResliceCursor,vtkObject); 00048 00049 static vtkResliceCursor *New(); 00050 00052 00053 virtual void SetImage(vtkImageData * ); 00054 vtkGetObjectMacro( Image, vtkImageData ); 00056 00058 00059 virtual void SetCenter( double, double, double ); 00060 virtual void SetCenter( double center[3] ); 00061 vtkGetVector3Macro( Center, double ); 00063 00065 00066 vtkSetVector3Macro( Thickness, double ); 00067 vtkGetVector3Macro( Thickness, double ); 00069 00071 00072 vtkSetMacro( ThickMode, int ); 00073 vtkGetMacro( ThickMode, int ); 00074 vtkBooleanMacro( ThickMode, int ); 00076 00078 virtual vtkPolyData * GetPolyData(); 00079 00081 virtual vtkPolyData * GetCenterlineAxisPolyData( int axis ); 00082 00084 virtual void PrintSelf(ostream& os, vtkIndent indent); 00085 00089 virtual vtkPlane * GetPlane( int n ); 00090 00092 virtual void Update(); 00093 00095 00096 vtkGetVector3Macro( XAxis, double ); 00097 vtkGetVector3Macro( YAxis, double ); 00098 vtkGetVector3Macro( ZAxis, double ); 00099 vtkSetVector3Macro( XAxis, double ); 00100 vtkSetVector3Macro( YAxis, double ); 00101 vtkSetVector3Macro( ZAxis, double ); 00102 virtual double * GetAxis( int i ); 00104 00106 00108 vtkSetMacro( Hole, int ); 00109 vtkGetMacro( Hole, int ); 00111 00113 00114 vtkSetMacro( HoleWidth, double ); 00115 vtkGetMacro( HoleWidth, double ); 00117 00119 00121 vtkSetMacro( HoleWidthInPixels, double ); 00122 vtkGetMacro( HoleWidthInPixels, double ); 00124 00126 virtual unsigned long int GetMTime(); 00127 00131 virtual void Reset(); 00132 00133 protected: 00134 vtkResliceCursor(); 00135 ~vtkResliceCursor(); 00136 00137 virtual void BuildCursorGeometry(); 00138 virtual void BuildPolyData(); 00139 virtual void BuildCursorTopology(); 00140 virtual void BuildCursorTopologyWithHole(); 00141 virtual void BuildCursorTopologyWithoutHole(); 00142 virtual void BuildCursorGeometryWithoutHole(); 00143 virtual void BuildCursorGeometryWithHole(); 00144 virtual void ComputeAxes(); 00145 00146 int ThickMode; 00147 int Hole; 00148 double HoleWidth; 00149 double HoleWidthInPixels; 00150 double Thickness[3]; 00151 double Center[3]; 00152 double XAxis[3]; 00153 double YAxis[3]; 00154 double ZAxis[3]; 00155 vtkImageData *Image; 00156 vtkPolyData *PolyData; 00157 00158 vtkPolyData *CenterlineAxis[3]; 00159 00160 vtkPlaneCollection * ReslicePlanes; 00161 vtkTimeStamp PolyDataBuildTime; 00162 00163 private: 00164 vtkResliceCursor(const vtkResliceCursor&); // Not implemented. 00165 void operator=(const vtkResliceCursor&); // Not implemented. 00166 }; 00167 00168 #endif