VTK
vtkResliceCursor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkResliceCursor.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 =========================================================================*/
34 #ifndef __vtkResliceCursor_h
35 #define __vtkResliceCursor_h
36 
37 #include "vtkObject.h"
38 
39 class vtkImageData;
40 class vtkPolyData;
41 class vtkPlane;
42 class vtkPlaneCollection;
43 
45 {
46 public:
47  vtkTypeMacro(vtkResliceCursor,vtkObject);
48 
49  static vtkResliceCursor *New();
50 
52 
53  virtual void SetImage(vtkImageData * );
54  vtkGetObjectMacro( Image, vtkImageData );
56 
58 
59  virtual void SetCenter( double, double, double );
60  virtual void SetCenter( double center[3] );
61  vtkGetVector3Macro( Center, double );
63 
65 
66  vtkSetVector3Macro( Thickness, double );
67  vtkGetVector3Macro( Thickness, double );
69 
71 
72  vtkSetMacro( ThickMode, int );
73  vtkGetMacro( ThickMode, int );
74  vtkBooleanMacro( ThickMode, int );
76 
78  virtual vtkPolyData * GetPolyData();
79 
81  virtual vtkPolyData * GetCenterlineAxisPolyData( int axis );
82 
84  virtual void PrintSelf(ostream& os, vtkIndent indent);
85 
89  virtual vtkPlane * GetPlane( int n );
90 
92  virtual void Update();
93 
95 
96  vtkGetVector3Macro( XAxis, double );
97  vtkGetVector3Macro( YAxis, double );
98  vtkGetVector3Macro( ZAxis, double );
99  vtkSetVector3Macro( XAxis, double );
100  vtkSetVector3Macro( YAxis, double );
101  vtkSetVector3Macro( ZAxis, double );
102  virtual double * GetAxis( int i );
104 
106 
108  vtkSetMacro( Hole, int );
109  vtkGetMacro( Hole, int );
111 
113 
114  vtkSetMacro( HoleWidth, double );
115  vtkGetMacro( HoleWidth, double );
117 
119 
121  vtkSetMacro( HoleWidthInPixels, double );
122  vtkGetMacro( HoleWidthInPixels, double );
124 
126  virtual unsigned long int GetMTime();
127 
131  virtual void Reset();
132 
133 protected:
135  ~vtkResliceCursor();
136 
137  virtual void BuildCursorGeometry();
138  virtual void BuildPolyData();
139  virtual void BuildCursorTopology();
140  virtual void BuildCursorTopologyWithHole();
141  virtual void BuildCursorTopologyWithoutHole();
142  virtual void BuildCursorGeometryWithoutHole();
143  virtual void BuildCursorGeometryWithHole();
144  virtual void ComputeAxes();
145 
147  int Hole;
148  double HoleWidth;
150  double Thickness[3];
151  double Center[3];
152  double XAxis[3];
153  double YAxis[3];
154  double ZAxis[3];
157 
158  vtkPolyData *CenterlineAxis[3];
159 
162 
163 private:
164  vtkResliceCursor(const vtkResliceCursor&); // Not implemented.
165  void operator=(const vtkResliceCursor&); // Not implemented.
166 };
167 
168 #endif