VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkResliceCursorPolyDataAlgorithm.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 =========================================================================*/ 00031 #ifndef __vtkResliceCursorPolyDataAlgorithm_h 00032 #define __vtkResliceCursorPolyDataAlgorithm_h 00033 00034 #include "vtkPolyDataAlgorithm.h" 00035 00036 class vtkCutter; 00037 class vtkResliceCursor; 00038 class vtkPlane; 00039 class vtkBox; 00040 class vtkClipPolyData; 00041 class vtkLinearExtrusionFilter; 00042 00043 class VTK_GRAPHICS_EXPORT vtkResliceCursorPolyDataAlgorithm : public vtkPolyDataAlgorithm 00044 { 00045 public: 00046 vtkTypeMacro(vtkResliceCursorPolyDataAlgorithm,vtkPolyDataAlgorithm); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00049 static vtkResliceCursorPolyDataAlgorithm *New(); 00050 00052 00053 vtkSetMacro(ReslicePlaneNormal,int); 00054 vtkGetMacro(ReslicePlaneNormal,int); 00056 00057 //BTX 00058 enum {XAxis=0,YAxis,ZAxis}; 00059 //ETX 00060 00062 00063 void SetReslicePlaneNormalToXAxis() 00064 { this->SetReslicePlaneNormal(XAxis); } 00065 void SetReslicePlaneNormalToYAxis() 00066 { this->SetReslicePlaneNormal(YAxis); } 00067 void SetReslicePlaneNormalToZAxis() 00068 { this->SetReslicePlaneNormal(ZAxis); } 00070 00072 00074 virtual void SetResliceCursor( vtkResliceCursor * ); 00075 vtkGetObjectMacro( ResliceCursor, vtkResliceCursor ); 00077 00079 00081 vtkSetVector6Macro( SliceBounds, double ); 00082 vtkGetVector6Macro( SliceBounds, double ); 00084 00086 00089 virtual vtkPolyData * GetCenterlineAxis1(); 00090 virtual vtkPolyData * GetCenterlineAxis2(); 00091 virtual vtkPolyData * GetThickSlabAxis1(); 00092 virtual vtkPolyData * GetThickSlabAxis2(); 00094 00096 00097 virtual int GetAxis1(); 00098 virtual int GetAxis2(); 00099 virtual int GetPlaneAxis1(); 00100 virtual int GetPlaneAxis2(); 00102 00105 int GetOtherPlaneForAxis( int p ); 00106 00109 virtual unsigned long int GetMTime(); 00110 00111 protected: 00112 vtkResliceCursorPolyDataAlgorithm(); 00113 ~vtkResliceCursorPolyDataAlgorithm(); 00114 00115 int RequestData(vtkInformation*, 00116 vtkInformationVector**, 00117 vtkInformationVector*); 00118 00119 void GetSlabPolyData( int axis, int planeAxis, vtkPolyData *pd ); 00120 00121 virtual void CutAndClip( vtkPolyData *in, vtkPolyData *out); 00122 00123 // Build the reslice slab axis 00124 void BuildResliceSlabAxisTopology(); 00125 00126 int ReslicePlaneNormal; 00127 vtkResliceCursor * ResliceCursor; 00128 vtkCutter * Cutter; 00129 vtkPlane * SlicePlane; 00130 vtkBox * Box; 00131 vtkClipPolyData * ClipWithBox; 00132 double SliceBounds[6]; 00133 bool Extrude; 00134 vtkLinearExtrusionFilter *ExtrusionFilter1; 00135 vtkLinearExtrusionFilter *ExtrusionFilter2; 00136 vtkPolyData *ThickAxes[2]; 00137 00138 private: 00139 vtkResliceCursorPolyDataAlgorithm(const vtkResliceCursorPolyDataAlgorithm&); // Not implemented. 00140 void operator=(const vtkResliceCursorPolyDataAlgorithm&); // Not implemented. 00141 00142 }; 00143 00144 #endif