Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkTopologicalHierarchy.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Csaba Pinter, PerkLab, Queen's University
16 and was supported through the Applied Cancer Research Unit program of Cancer Care
17 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18
19==============================================================================*/
20
21// .NAME vtkTopologicalHierarchy - Assigns hierarchy level values to the elements of a poly data collection
22// or to a list of bounding boxes
23// .SECTION Description
24
25#ifndef __vtkTopologicalHierarchy_h
26#define __vtkTopologicalHierarchy_h
27
28// VTK includes
29#include <vtkDoubleArray.h>
30#include <vtkPolyDataCollection.h>
31
32#include "vtkSegmentationCoreExport.h"
33
34class vtkIntArray;
35
46class vtkSegmentationCore_EXPORT vtkTopologicalHierarchy : public vtkObject
47{
48public:
50 vtkTypeMacro(vtkTopologicalHierarchy, vtkObject);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54 virtual vtkIntArray* GetOutputLevels();
55
60 virtual void Update();
61
63 vtkSetObjectMacro(InputPolyDataCollection, vtkPolyDataCollection);
64
68 vtkSetObjectMacro(InputBounds, vtkDoubleArray);
69 vtkGetObjectMacro(InputBounds, vtkDoubleArray);
70
72 vtkSetMacro(ContainConstraintFactor, double);
74 vtkGetMacro(ContainConstraintFactor, double);
75
76protected:
78 vtkSetObjectMacro(OutputLevels, vtkIntArray);
79
80protected:
83 bool Contains(vtkPolyData* polyOut, vtkPolyData* polyIn);
84
87 bool Contains(const double boundsOut[6], const double boundsIn[6]);
88
91
92protected:
94 vtkPolyDataCollection* InputPolyDataCollection;
95
97 vtkDoubleArray* InputBounds;
98
102 vtkIntArray* OutputLevels;
103
111
113 unsigned int MaximumLevel;
114
115protected:
118
119private:
121 void operator=(const vtkTopologicalHierarchy&) = delete;
122};
123
124#endif
~vtkTopologicalHierarchy() override
bool Contains(const double boundsOut[6], const double boundsIn[6])
bool OutputContainsEmptyLevels()
Determines if there are empty entries in the output level array.
void PrintSelf(ostream &os, vtkIndent indent) override
vtkPolyDataCollection * InputPolyDataCollection
Collection of poly data to determine the hierarchy for.
virtual vtkIntArray * GetOutputLevels()
Get output topological hierarchy levels.
bool Contains(vtkPolyData *polyOut, vtkPolyData *polyIn)
vtkDoubleArray * InputBounds
Bounding boxes to determine the hierarchy for (used instead of the poly data collection if set)
static vtkTopologicalHierarchy * New()
virtual void Update()
unsigned int MaximumLevel
Maximum level that can be assigned to a poly data.