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 "vtkInteractionWidgetsModule.h" // For export macro 00035 #include "vtkPolyDataAlgorithm.h" 00036 00037 class vtkCutter; 00038 class vtkResliceCursor; 00039 class vtkPlane; 00040 class vtkBox; 00041 class vtkClipPolyData; 00042 class vtkLinearExtrusionFilter; 00043 00044 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorPolyDataAlgorithm : public vtkPolyDataAlgorithm 00045 { 00046 public: 00047 vtkTypeMacro(vtkResliceCursorPolyDataAlgorithm,vtkPolyDataAlgorithm); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00050 static vtkResliceCursorPolyDataAlgorithm *New(); 00051 00053 00054 vtkSetMacro(ReslicePlaneNormal,int); 00055 vtkGetMacro(ReslicePlaneNormal,int); 00057 00058 //BTX 00059 enum {XAxis=0,YAxis,ZAxis}; 00060 //ETX 00061 00063 00064 void SetReslicePlaneNormalToXAxis() 00065 { this->SetReslicePlaneNormal(XAxis); } 00066 void SetReslicePlaneNormalToYAxis() 00067 { this->SetReslicePlaneNormal(YAxis); } 00068 void SetReslicePlaneNormalToZAxis() 00069 { this->SetReslicePlaneNormal(ZAxis); } 00071 00073 00075 virtual void SetResliceCursor( vtkResliceCursor * ); 00076 vtkGetObjectMacro( ResliceCursor, vtkResliceCursor ); 00078 00080 00082 vtkSetVector6Macro( SliceBounds, double ); 00083 vtkGetVector6Macro( SliceBounds, double ); 00085 00087 00090 virtual vtkPolyData * GetCenterlineAxis1(); 00091 virtual vtkPolyData * GetCenterlineAxis2(); 00092 virtual vtkPolyData * GetThickSlabAxis1(); 00093 virtual vtkPolyData * GetThickSlabAxis2(); 00095 00097 00098 virtual int GetAxis1(); 00099 virtual int GetAxis2(); 00100 virtual int GetPlaneAxis1(); 00101 virtual int GetPlaneAxis2(); 00103 00106 int GetOtherPlaneForAxis( int p ); 00107 00110 virtual unsigned long int GetMTime(); 00111 00112 protected: 00113 vtkResliceCursorPolyDataAlgorithm(); 00114 ~vtkResliceCursorPolyDataAlgorithm(); 00115 00116 int RequestData(vtkInformation*, 00117 vtkInformationVector**, 00118 vtkInformationVector*); 00119 00120 void GetSlabPolyData( int axis, int planeAxis, vtkPolyData *pd ); 00121 00122 virtual void CutAndClip( vtkPolyData *in, vtkPolyData *out); 00123 00124 // Build the reslice slab axis 00125 void BuildResliceSlabAxisTopology(); 00126 00127 int ReslicePlaneNormal; 00128 vtkResliceCursor * ResliceCursor; 00129 vtkCutter * Cutter; 00130 vtkPlane * SlicePlane; 00131 vtkBox * Box; 00132 vtkClipPolyData * ClipWithBox; 00133 double SliceBounds[6]; 00134 bool Extrude; 00135 vtkLinearExtrusionFilter *ExtrusionFilter1; 00136 vtkLinearExtrusionFilter *ExtrusionFilter2; 00137 vtkPolyData *ThickAxes[2]; 00138 00139 private: 00140 vtkResliceCursorPolyDataAlgorithm(const vtkResliceCursorPolyDataAlgorithm&); // Not implemented. 00141 void operator=(const vtkResliceCursorPolyDataAlgorithm&); // Not implemented. 00142 00143 }; 00144 00145 #endif