VTK
vtkResliceCursorPolyDataAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkResliceCursorPolyDataAlgorithm.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef __vtkResliceCursorPolyDataAlgorithm_h
32 #define __vtkResliceCursorPolyDataAlgorithm_h
33 
34 #include "vtkPolyDataAlgorithm.h"
35 
36 class vtkCutter;
37 class vtkResliceCursor;
38 class vtkPlane;
39 class vtkBox;
40 class vtkClipPolyData;
42 
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
52 
53  vtkSetMacro(ReslicePlaneNormal,int);
54  vtkGetMacro(ReslicePlaneNormal,int);
56 
57 //BTX
58  enum {XAxis=0,YAxis,ZAxis};
59 //ETX
60 
62 
63  void SetReslicePlaneNormalToXAxis()
64  { this->SetReslicePlaneNormal(XAxis); }
65  void SetReslicePlaneNormalToYAxis()
66  { this->SetReslicePlaneNormal(YAxis); }
67  void SetReslicePlaneNormalToZAxis()
68  { this->SetReslicePlaneNormal(ZAxis); }
70 
72 
74  virtual void SetResliceCursor( vtkResliceCursor * );
75  vtkGetObjectMacro( ResliceCursor, vtkResliceCursor );
77 
79 
81  vtkSetVector6Macro( SliceBounds, double );
82  vtkGetVector6Macro( SliceBounds, double );
84 
86 
89  virtual vtkPolyData * GetCenterlineAxis1();
90  virtual vtkPolyData * GetCenterlineAxis2();
91  virtual vtkPolyData * GetThickSlabAxis1();
92  virtual vtkPolyData * GetThickSlabAxis2();
94 
96 
97  virtual int GetAxis1();
98  virtual int GetAxis2();
99  virtual int GetPlaneAxis1();
100  virtual int GetPlaneAxis2();
102 
105  int GetOtherPlaneForAxis( int p );
106 
109  virtual unsigned long int GetMTime();
110 
111 protected:
114 
118 
119  void GetSlabPolyData( int axis, int planeAxis, vtkPolyData *pd );
120 
121  virtual void CutAndClip( vtkPolyData *in, vtkPolyData *out);
122 
123  // Build the reslice slab axis
124  void BuildResliceSlabAxisTopology();
125 
132  double SliceBounds[6];
133  bool Extrude;
136  vtkPolyData *ThickAxes[2];
137 
138 private:
140  void operator=(const vtkResliceCursorPolyDataAlgorithm&); // Not implemented.
141 
142 };
143 
144 #endif