VMTK
Loading...
Searching...
No Matches
vtkvmtkPolyDataBranchSections.h
Go to the documentation of this file.
1/*=========================================================================
2
3Program: VMTK
4
5 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
6 See LICENSE file for details.
7
8 Portions of this code are covered under the VTK copyright.
9 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
10 for details.
11
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
15
16=========================================================================*/
44
45#ifndef __vtkvmtkPolyDataBranchSections_h
46#define __vtkvmtkPolyDataBranchSections_h
47
48#include "vtkPolyDataAlgorithm.h"
49//#include "vtkvmtkComputationalGeometryWin32Header.h"
50#include "vtkvmtkWin32Header.h"
51#include "vtkPolyData.h"
52
53class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkPolyDataBranchSections : public vtkPolyDataAlgorithm
54{
55 public:
56 vtkTypeMacro(vtkvmtkPolyDataBranchSections,vtkPolyDataAlgorithm);
57 void PrintSelf(std::ostream& os, vtkIndent indent) override;
58
60
62
67 vtkSetStringMacro(GroupIdsArrayName);
68 vtkGetStringMacro(GroupIdsArrayName);
70
72
75 vtkSetObjectMacro(Centerlines,vtkPolyData);
76 vtkGetObjectMacro(Centerlines,vtkPolyData);
78
80
85 vtkSetStringMacro(CenterlineRadiusArrayName);
86 vtkGetStringMacro(CenterlineRadiusArrayName);
88
90
94 vtkSetStringMacro(CenterlineGroupIdsArrayName);
95 vtkGetStringMacro(CenterlineGroupIdsArrayName);
97
99
104 vtkSetStringMacro(CenterlineIdsArrayName);
105 vtkGetStringMacro(CenterlineIdsArrayName);
107
109
113 vtkSetStringMacro(CenterlineTractIdsArrayName);
114 vtkGetStringMacro(CenterlineTractIdsArrayName);
116
118
123 vtkSetStringMacro(BlankingArrayName);
124 vtkGetStringMacro(BlankingArrayName);
126
128
133 vtkSetStringMacro(BranchSectionAreaArrayName);
134 vtkGetStringMacro(BranchSectionAreaArrayName);
136
138
146
148
156
158
163 vtkSetStringMacro(BranchSectionShapeArrayName);
164 vtkGetStringMacro(BranchSectionShapeArrayName);
166
168
176
178
186
188
196
198
203 vtkSetMacro(NumberOfDistanceSpheres,int);
204 vtkGetMacro(NumberOfDistanceSpheres,int);
206
208
212 vtkSetMacro(ReverseDirection,int);
213 vtkGetMacro(ReverseDirection,int);
214 vtkBooleanMacro(ReverseDirection,int);
216
220 static double ComputeBranchSectionArea(vtkPolyData* branchSection);
221
226 static double ComputeBranchSectionShape(vtkPolyData* branchSection, double center[3], double sizeRange[2]);
227
252 static void ExtractCylinderSection(vtkPolyData* cylinder, double origin[3], double normal[3], vtkPolyData* section, bool & closed, const char* idsArrayName = nullptr);
253
277 static int CountBranchSectionCenterlines(vtkPolyData* section, vtkPolyData* centerlines, double origin[3], double normal[3]);
278
300 static int CountBranchSectionIds(vtkPolyData* section, const char* idsArrayName);
301
302 protected:
305
306 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
307
308 void ComputeBranchSections(vtkPolyData* input, int groupId, vtkPolyData* output);
309
310 vtkPolyData* Centerlines;
311
318
326
329
330 private:
332 void operator=(const vtkvmtkPolyDataBranchSections&); // Not implemented.
333};
334
335#endif
static int CountBranchSectionIds(vtkPolyData *section, const char *idsArrayName)
void PrintSelf(std::ostream &os, vtkIndent indent) override
static double ComputeBranchSectionArea(vtkPolyData *branchSection)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void ComputeBranchSections(vtkPolyData *input, int groupId, vtkPolyData *output)
static void ExtractCylinderSection(vtkPolyData *cylinder, double origin[3], double normal[3], vtkPolyData *section, bool &closed, const char *idsArrayName=nullptr)
static double ComputeBranchSectionShape(vtkPolyData *branchSection, double center[3], double sizeRange[2])
static vtkvmtkPolyDataBranchSections * New()
static int CountBranchSectionCenterlines(vtkPolyData *section, vtkPolyData *centerlines, double origin[3], double normal[3])