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
vtkPlane
perform various plane computations
Definition: vtkPlane.h:31
vtkResliceCursorPolyDataAlgorithm::SetReslicePlaneNormalToYAxis
void SetReslicePlaneNormalToYAxis()
Definition: vtkResliceCursorPolyDataAlgorithm.h:72
vtkLinearExtrusionFilter
sweep polygonal data creating a "skirt" from free edges and lines, and lines from vertices
Definition: vtkLinearExtrusionFilter.h:64
vtkResliceCursorPolyDataAlgorithm::SlicePlane
vtkPlane * SlicePlane
Definition: vtkResliceCursorPolyDataAlgorithm.h:142
vtkCutter
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:63
vtkResliceCursorPolyDataAlgorithm::ReslicePlaneNormal
int ReslicePlaneNormal
Definition: vtkResliceCursorPolyDataAlgorithm.h:139
vtkResliceCursorPolyDataAlgorithm::ExtrusionFilter2
vtkLinearExtrusionFilter * ExtrusionFilter2
Definition: vtkResliceCursorPolyDataAlgorithm.h:148
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkResliceCursor
Geometry for a reslice cursor.
Definition: vtkResliceCursor.h:43
vtkResliceCursorPolyDataAlgorithm::Cutter
vtkCutter * Cutter
Definition: vtkResliceCursorPolyDataAlgorithm.h:141
vtkResliceCursorPolyDataAlgorithm::Extrude
bool Extrude
Definition: vtkResliceCursorPolyDataAlgorithm.h:146
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkResliceCursorPolyDataAlgorithm::YAxis
@ YAxis
Definition: vtkResliceCursorPolyDataAlgorithm.h:64
vtkPolyDataAlgorithm.h
vtkResliceCursorPolyDataAlgorithm::ExtrusionFilter1
vtkLinearExtrusionFilter * ExtrusionFilter1
Definition: vtkResliceCursorPolyDataAlgorithm.h:147
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkResliceCursorPolyDataAlgorithm
generates a 2D reslice cursor polydata
Definition: vtkResliceCursorPolyDataAlgorithm.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkResliceCursorPolyDataAlgorithm::ClipWithBox
vtkClipPolyData * ClipWithBox
Definition: vtkResliceCursorPolyDataAlgorithm.h:144
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkResliceCursorPolyDataAlgorithm::Box
vtkBox * Box
Definition: vtkResliceCursorPolyDataAlgorithm.h:143
vtkClipPolyData
clip polygonal data with user-specified implicit function or input scalar data
Definition: vtkClipPolyData.h:68
vtkBox
implicit function for a bounding box
Definition: vtkBox.h:38
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkResliceCursorPolyDataAlgorithm::ResliceCursor
vtkResliceCursor * ResliceCursor
Definition: vtkResliceCursorPolyDataAlgorithm.h:140
vtkResliceCursorPolyDataAlgorithm::SetReslicePlaneNormalToZAxis
void SetReslicePlaneNormalToZAxis()
Definition: vtkResliceCursorPolyDataAlgorithm.h:73
vtkResliceCursorPolyDataAlgorithm::SetReslicePlaneNormalToXAxis
void SetReslicePlaneNormalToXAxis()
Set the planes that correspond to the reslice axes.
Definition: vtkResliceCursorPolyDataAlgorithm.h:71
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41