VTK  9.0.1
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 =========================================================================*/
32 #ifndef vtkResliceCursorPolyDataAlgorithm_h
33 #define vtkResliceCursorPolyDataAlgorithm_h
34 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
38 class vtkCutter;
39 class vtkResliceCursor;
40 class vtkPlane;
41 class vtkBox;
42 class vtkClipPolyData;
44 
45 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorPolyDataAlgorithm : public vtkPolyDataAlgorithm
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
54 
57  vtkSetMacro(ReslicePlaneNormal, int);
58  vtkGetMacro(ReslicePlaneNormal, int);
60 
61  enum
62  {
63  XAxis = 0,
65  ZAxis
66  };
67 
71  void SetReslicePlaneNormalToXAxis() { this->SetReslicePlaneNormal(XAxis); }
72  void SetReslicePlaneNormalToYAxis() { this->SetReslicePlaneNormal(YAxis); }
73  void SetReslicePlaneNormalToZAxis() { this->SetReslicePlaneNormal(ZAxis); }
74 
76 
79  virtual void SetResliceCursor(vtkResliceCursor*);
80  vtkGetObjectMacro(ResliceCursor, vtkResliceCursor);
82 
84 
88  vtkSetVector6Macro(SliceBounds, double);
89  vtkGetVector6Macro(SliceBounds, double);
91 
93 
98  virtual vtkPolyData* GetCenterlineAxis1();
99  virtual vtkPolyData* GetCenterlineAxis2();
100  virtual vtkPolyData* GetThickSlabAxis1();
101  virtual vtkPolyData* GetThickSlabAxis2();
103 
105 
108  virtual int GetAxis1();
109  virtual int GetAxis2();
110  virtual int GetPlaneAxis1();
111  virtual int GetPlaneAxis2();
113 
118  int GetOtherPlaneForAxis(int p);
119 
124  vtkMTimeType GetMTime() override;
125 
126 protected:
129 
131 
132  void GetSlabPolyData(int axis, int planeAxis, vtkPolyData* pd);
133 
134  virtual void CutAndClip(vtkPolyData* in, vtkPolyData* out);
135 
136  // Build the reslice slab axis
137  void BuildResliceSlabAxisTopology();
138 
145  double SliceBounds[6];
146  bool Extrude;
149  vtkPolyData* ThickAxes[2];
150 
151 private:
153  void operator=(const vtkResliceCursorPolyDataAlgorithm&) = delete;
154 };
155 
156 #endif
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:63
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
generates a 2D reslice cursor polydata
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual vtkMTimeType GetMTime()
Return this object's modified time.
perform various plane computations
Definition: vtkPlane.h:31
clip polygonal data with user-specified implicit function or input scalar data
sweep polygonal data creating a "skirt" from free edges and lines, and lines from vertices ...
Store zero or more vtkInformation instances.
void SetReslicePlaneNormalToXAxis()
Set the planes that correspond to the reslice axes.
implicit function for a bounding box
Definition: vtkBox.h:38
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Geometry for a reslice cursor.