VMTK
Loading...
Searching...
No Matches
vtkvmtkPolyDataCenterlineBranchSplitting.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 This file is derived from vtkvmtkPolyDataCenterlineSections of SimVascular
17 (https://github.com/SimVascular/SimVascular), provided under the following
18 license:
19
20 Copyright (c) Stanford University, The Regents of the University of
21 California, and others.
22
23 All Rights Reserved.
24
25 Permission is hereby granted, free of charge, to any person obtaining a copy
26 of this software and associated documentation files (the "Software"), to deal
27 in the Software without restriction, including without limitation the rights
28 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29 copies of the Software, and to permit persons to whom the Software is
30 furnished to do so, subject to the following conditions:
31
32 The above copyright notice and this permission notice shall be included in
33 all copies or substantial portions of the Software.
34
35 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
41 SOFTWARE.
42
43=========================================================================*/
102
103#ifndef __vtkvmtkPolyDataCenterlineBranchSplitting_h
104#define __vtkvmtkPolyDataCenterlineBranchSplitting_h
105
107#include "vtkvmtkWin32Header.h"
108
109class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkPolyDataCenterlineBranchSplitting : public vtkvmtkPolyDataCenterlineSections
110{
111 public:
113 void PrintSelf(std::ostream& os, vtkIndent indent) override;
114
116
121 vtkGetObjectMacro(Surface,vtkPolyData);
122
124
128 vtkSetStringMacro(RadiusArrayName);
129 vtkGetStringMacro(RadiusArrayName);
131
133
137 vtkSetStringMacro(BranchIdArrayName);
138 vtkGetStringMacro(BranchIdArrayName);
140
142
146 vtkSetStringMacro(BifurcationIdArrayName);
147 vtkGetStringMacro(BifurcationIdArrayName);
149
151
155 vtkSetStringMacro(PathArrayName);
156 vtkGetStringMacro(PathArrayName);
158
160
165 vtkSetStringMacro(CenterlineIdArrayName);
166 vtkGetStringMacro(CenterlineIdArrayName);
168
170
175 vtkSetStringMacro(GlobalNodeIdArrayName);
176 vtkGetStringMacro(GlobalNodeIdArrayName);
178
180
187
189
197
198 protected:
201
202 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
203
204 bool ComputeSectionPlane(vtkIdType cellId, vtkIdType cellPointIndex, double origin[3], double normal[3]) override;
205 void ExtractSection(vtkPolyData* input, double origin[3], double normal[3], vtkPolyData* section, bool & closed) override;
206 void ProcessSection(vtkPolyData* input, vtkIdType pointId, vtkIdType sectionId, vtkPolyData* section, double origin[3], double normal[3], bool closed) override;
207
213
218 void ComputeTangents();
219
223 bool RefineCapPoints();
224
229 bool LabelSurface(const char* labelArrayName, const char* otherArrayName);
230
236 bool CleanBifurcations();
237
242 bool GroupCenterlines();
243
247 void SplitCenterlines(vtkPolyData* bifurcations, vtkPolyData* branches);
248
253 void LabelConnectedRegions(vtkPolyData* lines, const char* labelArrayName, const char* otherArrayName);
254
255 vtkPolyData* Surface;
256
265
267
268 private:
270 void operator=(const vtkvmtkPolyDataCenterlineBranchSplitting&); // Not implemented.
271
272 class vtkInternals;
273 vtkInternals* Internals;
274};
275
276#endif
void LabelConnectedRegions(vtkPolyData *lines, const char *labelArrayName, const char *otherArrayName)
void SplitCenterlines(vtkPolyData *bifurcations, vtkPolyData *branches)
static vtkvmtkPolyDataCenterlineBranchSplitting * New()
bool LabelSurface(const char *labelArrayName, const char *otherArrayName)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
virtual void ExtractSection(vtkPolyData *input, double origin[3], double normal[3], vtkPolyData *section, bool &closed)
void PrintSelf(std::ostream &os, vtkIndent indent) override
virtual void ProcessSection(vtkPolyData *input, vtkIdType pointId, vtkIdType sectionId, vtkPolyData *section, double origin[3], double normal[3], bool closed)
virtual bool ComputeSectionPlane(vtkIdType cellId, vtkIdType cellPointIndex, double origin[3], double normal[3])