VMTK
Loading...
Searching...
No Matches
vtkvmtkPolyDataCenterlineBranchSplitting Class Reference

Split centerlines into branches and bifurcations and cut vessel sections along them. More...

#include <vtkvmtkPolyDataCenterlineBranchSplitting.h>

Inheritance diagram for vtkvmtkPolyDataCenterlineBranchSplitting:
[legend]
Collaboration diagram for vtkvmtkPolyDataCenterlineBranchSplitting:
[legend]

Classes

class  vtkInternals

Public Types

typedef vtkvmtkPolyDataCenterlineSections Superclass
Public Types inherited from vtkvmtkPolyDataCenterlineSections
typedef vtkPolyDataAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkPolyDataCenterlineBranchSplitting * NewInstance () const
void PrintSelf (std::ostream &os, vtkIndent indent) override
virtual vtkPolyData * GetSurface ()
virtual void SetRadiusArrayName (const char *)
virtual char * GetRadiusArrayName ()
virtual void SetBranchIdArrayName (const char *)
virtual char * GetBranchIdArrayName ()
virtual void SetBifurcationIdArrayName (const char *)
virtual char * GetBifurcationIdArrayName ()
virtual void SetPathArrayName (const char *)
virtual char * GetPathArrayName ()
virtual void SetCenterlineIdArrayName (const char *)
virtual char * GetCenterlineIdArrayName ()
virtual void SetGlobalNodeIdArrayName (const char *)
virtual char * GetGlobalNodeIdArrayName ()
virtual void SetCenterlineSectionNormalArrayName (const char *)
virtual char * GetCenterlineSectionNormalArrayName ()
virtual void SetCenterlineSectionBifurcationArrayName (const char *)
virtual char * GetCenterlineSectionBifurcationArrayName ()
Public Member Functions inherited from vtkvmtkPolyDataCenterlineSections
vtkvmtkPolyDataCenterlineSections * NewInstance () const
void PrintSelf (std::ostream &os, vtkIndent indent) override
virtual void SetCenterlines (vtkPolyData *)
virtual vtkPolyData * GetCenterlines ()
virtual void SetCenterlineSectionAreaArrayName (const char *)
virtual char * GetCenterlineSectionAreaArrayName ()
virtual void SetCenterlineSectionMinSizeArrayName (const char *)
virtual char * GetCenterlineSectionMinSizeArrayName ()
virtual void SetCenterlineSectionMaxSizeArrayName (const char *)
virtual char * GetCenterlineSectionMaxSizeArrayName ()
virtual void SetCenterlineSectionShapeArrayName (const char *)
virtual char * GetCenterlineSectionShapeArrayName ()
virtual void SetCenterlineSectionClosedArrayName (const char *)
virtual char * GetCenterlineSectionClosedArrayName ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkvmtkPolyDataCenterlineBranchSplitting * SafeDownCast (vtkObjectBase *o)
static vtkvmtkPolyDataCenterlineBranchSplitting * New ()
Static Public Member Functions inherited from vtkvmtkPolyDataCenterlineSections
static int IsTypeOf (const char *type)
static vtkvmtkPolyDataCenterlineSections * SafeDownCast (vtkObjectBase *o)
static vtkvmtkPolyDataCenterlineSections * New ()

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkPolyDataCenterlineBranchSplitting ()
 ~vtkvmtkPolyDataCenterlineBranchSplitting ()
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
bool ComputeSectionPlane (vtkIdType cellId, vtkIdType cellPointIndex, double origin[3], double normal[3]) override
void ExtractSection (vtkPolyData *input, double origin[3], double normal[3], vtkPolyData *section, bool &closed) override
void ProcessSection (vtkPolyData *input, vtkIdType pointId, vtkIdType sectionId, vtkPolyData *section, double origin[3], double normal[3], bool closed) override
bool GenerateCleanCenterlines ()
void ComputeTangents ()
bool RefineCapPoints ()
bool LabelSurface (const char *labelArrayName, const char *otherArrayName)
bool CleanBifurcations ()
bool GroupCenterlines ()
void SplitCenterlines (vtkPolyData *bifurcations, vtkPolyData *branches)
void LabelConnectedRegions (vtkPolyData *lines, const char *labelArrayName, const char *otherArrayName)
Protected Member Functions inherited from vtkvmtkPolyDataCenterlineSections
 vtkvmtkPolyDataCenterlineSections ()
 ~vtkvmtkPolyDataCenterlineSections ()
void ComputeCenterlineSections (vtkPolyData *input, vtkPolyData *output)
bool AbortRequested ()

Protected Attributes

vtkPolyData * Surface
char * RadiusArrayName
char * BranchIdArrayName
char * BifurcationIdArrayName
char * PathArrayName
char * CenterlineIdArrayName
char * GlobalNodeIdArrayName
char * CenterlineSectionNormalArrayName
char * CenterlineSectionBifurcationArrayName
int NumberOfCenterlines
Protected Attributes inherited from vtkvmtkPolyDataCenterlineSections
vtkPolyData * Centerlines
char * CenterlineSectionAreaArrayName
char * CenterlineSectionMinSizeArrayName
char * CenterlineSectionMaxSizeArrayName
char * CenterlineSectionShapeArrayName
char * CenterlineSectionClosedArrayName

Detailed Description

Split centerlines into branches and bifurcations and cut vessel sections along them.

Takes as input a closed vessel surface and the centerlines computed from it from a single inlet to each outlet, such as the output of vtkvmtkPolyDataCenterlines, with the maximum inscribed sphere radius at each point. This is the geometry processing needed to build reduced-order (0D and 1D) blood flow models, originally developed for SimVascular.

The centerlines are merged into a single tree without duplicated points, smoothed, and refined next to each cap. A section of the surface is cut perpendicular to the centerline at each point, as in vtkvmtkPolyDataCenterlineSections, and each section is classified as part of a single branch or of a bifurcation region, from the number of centerlines passing through it (vtkvmtkPolyDataBranchSections::CountBranchSectionCenterlines) and the number of branches of the surface it touches (vtkvmtkPolyDataBranchSections::CountBranchSectionIds). The centerlines are then split into branches and bifurcations, which are numbered, and the surface is labeled with the branch or bifurcation each point belongs to.

Results:

  • Output: one section per centerline point, with the section properties of vtkvmtkPolyDataCenterlineSections and, as cell data, whether the section is in a bifurcation region (CenterlineSectionBifurcationArrayName) and the id of its centerline point (GlobalNodeIdArrayName). Sections are cut before points in bifurcation regions within a branch are removed from the centerlines, so these ids do not match the ids of the output centerlines when points were removed.
  • Centerlines: replaced by the processed centerlines, a tree of two-point lines, with point data holding the section properties, the section normal (CenterlineSectionNormalArrayName), the branch id (BranchIdArrayName) or bifurcation id (BifurcationIdArrayName) of each point (-1 for the other kind), the distance along its branch or bifurcation (PathArrayName), which input centerlines pass through the point (CenterlineIdArrayName, one component per input centerline), and the point id (GlobalNodeIdArrayName).
  • Surface: the input surface with point normals and the branch id and bifurcation id of each point, from the nearest centerline point of a branch and of a bifurcation in front of it, or -1 if there is none. Points near a bifurcation have both.

The filter replaces the content of the object set as Centerlines, so updating it again after changing its parameters requires setting the original centerlines again.

Provenance and credits
Ported from the vtkvmtkPolyDataCenterlineSections class of SimVascular (https://github.com/SimVascular/SimVascular, Code/ThirdParty/vmtk/simvascular_vmtk, as of commit 344727f3 of October 2025), SimVascular's extension of the VMTK class of the same name, which computes the centerlines, branches and bifurcations used to generate 0D and 1D models, written by Martin R. Pfaller, with changes by Luca Pegolotti and David W. Parker. The framework that uses it is described in M. R. Pfaller, J. Pham, A. Verma, L. Pegolotti, N. M. Wilson, D. W. Parker, W. Yang, A. L. Marsden, "Automated generation of 0D and 1D reduced-order models of patient-specific blood flow", International Journal for Numerical Methods in Biomedical Engineering, 38(10), e3639, 2022, https://doi.org/10.1002/cnm.3639. Compared with SimVascular's implementation, it is a subclass of vtkvmtkPolyDataCenterlineSections instead of a replacement, labels of the surface are copied to sections without interpolation, surface normals are always computed with a consistent orientation, branch and bifurcation ids are kept with VTK 9.4 and later, errors are reported through VTK, and progress is reported; branch and bifurcation ids, paths, section normals and surface labels are otherwise the same.
See also
vtkvmtkPolyDataCenterlineSections, vtkvmtkPolyDataBranchSections, vtkvmtkPolyDataCenterlines

Definition at line 109 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkvmtkPolyDataCenterlineBranchSplitting()

vtkvmtkPolyDataCenterlineBranchSplitting::vtkvmtkPolyDataCenterlineBranchSplitting ( )
protected

Definition at line 206 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

207{
208 this->SetCenterlineSectionAreaArrayName("CenterlineSectionArea");
209 this->SetCenterlineSectionMinSizeArrayName("CenterlineSectionMinSize");
210 this->SetCenterlineSectionMaxSizeArrayName("CenterlineSectionMaxSize");
211 this->SetCenterlineSectionShapeArrayName("CenterlineSectionShape");
212 this->SetCenterlineSectionClosedArrayName("CenterlineSectionClosed");
213
214 this->Surface = vtkPolyData::New();
215
216 this->RadiusArrayName = nullptr;
217 this->BranchIdArrayName = nullptr;
218 this->BifurcationIdArrayName = nullptr;
219 this->PathArrayName = nullptr;
220 this->CenterlineIdArrayName = nullptr;
221 this->GlobalNodeIdArrayName = nullptr;
222 this->CenterlineSectionNormalArrayName = nullptr;
224
225 this->SetRadiusArrayName("MaximumInscribedSphereRadius");
226 this->SetBranchIdArrayName("BranchId");
227 this->SetBifurcationIdArrayName("BifurcationId");
228 this->SetPathArrayName("Path");
229 this->SetCenterlineIdArrayName("CenterlineId");
230 this->SetGlobalNodeIdArrayName("GlobalNodeId");
231 this->SetCenterlineSectionNormalArrayName("CenterlineSectionNormal");
232 this->SetCenterlineSectionBifurcationArrayName("CenterlineSectionBifurcation");
233
234 this->NumberOfCenterlines = 0;
235
236 this->Internals = new vtkInternals;
237}
virtual void SetPathArrayName(const char *)
virtual void SetCenterlineSectionBifurcationArrayName(const char *)
virtual void SetBranchIdArrayName(const char *)
virtual void SetCenterlineSectionNormalArrayName(const char *)
virtual void SetGlobalNodeIdArrayName(const char *)
virtual void SetRadiusArrayName(const char *)
virtual void SetCenterlineIdArrayName(const char *)
virtual void SetBifurcationIdArrayName(const char *)
virtual void SetCenterlineSectionMaxSizeArrayName(const char *)
virtual void SetCenterlineSectionAreaArrayName(const char *)
virtual void SetCenterlineSectionShapeArrayName(const char *)
virtual void SetCenterlineSectionClosedArrayName(const char *)
virtual void SetCenterlineSectionMinSizeArrayName(const char *)

◆ ~vtkvmtkPolyDataCenterlineBranchSplitting()

vtkvmtkPolyDataCenterlineBranchSplitting::~vtkvmtkPolyDataCenterlineBranchSplitting ( )
protected

Definition at line 239 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

240{
241 this->Surface->Delete();
242 this->Surface = nullptr;
243
244 this->SetRadiusArrayName(nullptr);
245 this->SetBranchIdArrayName(nullptr);
246 this->SetBifurcationIdArrayName(nullptr);
247 this->SetPathArrayName(nullptr);
248 this->SetCenterlineIdArrayName(nullptr);
249 this->SetGlobalNodeIdArrayName(nullptr);
252
253 delete this->Internals;
254}

Member Function Documentation

◆ IsTypeOf()

int vtkvmtkPolyDataCenterlineBranchSplitting::IsTypeOf ( const char * type)
static

◆ IsA()

virtual int vtkvmtkPolyDataCenterlineBranchSplitting::IsA ( const char * type)
virtual

Reimplemented from vtkvmtkPolyDataCenterlineSections.

◆ SafeDownCast()

vtkvmtkPolyDataCenterlineBranchSplitting * vtkvmtkPolyDataCenterlineBranchSplitting::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkPolyDataCenterlineBranchSplitting::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkvmtkPolyDataCenterlineSections.

◆ NewInstance()

vtkvmtkPolyDataCenterlineBranchSplitting * vtkvmtkPolyDataCenterlineBranchSplitting::NewInstance ( ) const

◆ PrintSelf()

void vtkvmtkPolyDataCenterlineBranchSplitting::PrintSelf ( std::ostream & os,
vtkIndent indent )
override

Definition at line 1339 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

1340{
1341 this->Superclass::PrintSelf(os,indent);
1342 os << indent << "RadiusArrayName: " << (this->RadiusArrayName ? this->RadiusArrayName : "(none)") << "\n";
1343 os << indent << "BranchIdArrayName: " << (this->BranchIdArrayName ? this->BranchIdArrayName : "(none)") << "\n";
1344 os << indent << "BifurcationIdArrayName: " << (this->BifurcationIdArrayName ? this->BifurcationIdArrayName : "(none)") << "\n";
1345 os << indent << "PathArrayName: " << (this->PathArrayName ? this->PathArrayName : "(none)") << "\n";
1346 os << indent << "CenterlineIdArrayName: " << (this->CenterlineIdArrayName ? this->CenterlineIdArrayName : "(none)") << "\n";
1347 os << indent << "GlobalNodeIdArrayName: " << (this->GlobalNodeIdArrayName ? this->GlobalNodeIdArrayName : "(none)") << "\n";
1348 os << indent << "CenterlineSectionNormalArrayName: " << (this->CenterlineSectionNormalArrayName ? this->CenterlineSectionNormalArrayName : "(none)") << "\n";
1349 os << indent << "CenterlineSectionBifurcationArrayName: " << (this->CenterlineSectionBifurcationArrayName ? this->CenterlineSectionBifurcationArrayName : "(none)") << "\n";
1350}
void PrintSelf(std::ostream &os, vtkIndent indent) override

◆ New()

vtkvmtkPolyDataCenterlineBranchSplitting * vtkvmtkPolyDataCenterlineBranchSplitting::New ( )
static

◆ GetSurface()

virtual vtkPolyData * vtkvmtkPolyDataCenterlineBranchSplitting::GetSurface ( )
virtual

Get the input surface with point normals and the branch and bifurcation id of each point, after the filter has been updated.

◆ SetRadiusArrayName()

virtual void vtkvmtkPolyDataCenterlineBranchSplitting::SetRadiusArrayName ( const char * )
virtual

Set/Get the name of the point data array of the input centerlines holding the maximum inscribed sphere radius at each point. Default: "MaximumInscribedSphereRadius".

◆ GetRadiusArrayName()

virtual char * vtkvmtkPolyDataCenterlineBranchSplitting::GetRadiusArrayName ( )
virtual

Set/Get the name of the point data array of the input centerlines holding the maximum inscribed sphere radius at each point. Default: "MaximumInscribedSphereRadius".

◆ SetBranchIdArrayName()

virtual void vtkvmtkPolyDataCenterlineBranchSplitting::SetBranchIdArrayName ( const char * )
virtual

Set/Get the name of the point data arrays of the output centerlines and surface holding the branch id of each point, -1 for points in a bifurcation region. Default: "BranchId".

◆ GetBranchIdArrayName()

virtual char * vtkvmtkPolyDataCenterlineBranchSplitting::GetBranchIdArrayName ( )
virtual

Set/Get the name of the point data arrays of the output centerlines and surface holding the branch id of each point, -1 for points in a bifurcation region. Default: "BranchId".

◆ SetBifurcationIdArrayName()

virtual void vtkvmtkPolyDataCenterlineBranchSplitting::SetBifurcationIdArrayName ( const char * )
virtual

Set/Get the name of the point data arrays of the output centerlines and surface holding the bifurcation id of each point, -1 for points in a branch. Default: "BifurcationId".

◆ GetBifurcationIdArrayName()

virtual char * vtkvmtkPolyDataCenterlineBranchSplitting::GetBifurcationIdArrayName ( )
virtual

Set/Get the name of the point data arrays of the output centerlines and surface holding the bifurcation id of each point, -1 for points in a branch. Default: "BifurcationId".

◆ SetPathArrayName()

virtual void vtkvmtkPolyDataCenterlineBranchSplitting::SetPathArrayName ( const char * )
virtual

Set/Get the name of the point data array of the output centerlines holding the distance of each point along its branch or bifurcation from its first point. Default: "Path".

◆ GetPathArrayName()

virtual char * vtkvmtkPolyDataCenterlineBranchSplitting::GetPathArrayName ( )
virtual

Set/Get the name of the point data array of the output centerlines holding the distance of each point along its branch or bifurcation from its first point. Default: "Path".

◆ SetCenterlineIdArrayName()

virtual void vtkvmtkPolyDataCenterlineBranchSplitting::SetCenterlineIdArrayName ( const char * )
virtual

Set/Get the name of the point data array of the output centerlines that has one component for each input centerline, 1 if that centerline passes through the point and 0 otherwise. Default: "CenterlineId".

◆ GetCenterlineIdArrayName()

virtual char * vtkvmtkPolyDataCenterlineBranchSplitting::GetCenterlineIdArrayName ( )
virtual

Set/Get the name of the point data array of the output centerlines that has one component for each input centerline, 1 if that centerline passes through the point and 0 otherwise. Default: "CenterlineId".

◆ SetGlobalNodeIdArrayName()

virtual void vtkvmtkPolyDataCenterlineBranchSplitting::SetGlobalNodeIdArrayName ( const char * )
virtual

Set/Get the name of the point data array of the output centerlines holding the id of each point, and of the output cell data array holding the id of the centerline point each section was cut at. Default: "GlobalNodeId".

◆ GetGlobalNodeIdArrayName()

virtual char * vtkvmtkPolyDataCenterlineBranchSplitting::GetGlobalNodeIdArrayName ( )
virtual

Set/Get the name of the point data array of the output centerlines holding the id of each point, and of the output cell data array holding the id of the centerline point each section was cut at. Default: "GlobalNodeId".

◆ SetCenterlineSectionNormalArrayName()

virtual void vtkvmtkPolyDataCenterlineBranchSplitting::SetCenterlineSectionNormalArrayName ( const char * )
virtual

Set/Get the name of the point data array of the output centerlines holding the unit normal of the section at each point, the centerline tangent. Default: "CenterlineSectionNormal".

◆ GetCenterlineSectionNormalArrayName()

virtual char * vtkvmtkPolyDataCenterlineBranchSplitting::GetCenterlineSectionNormalArrayName ( )
virtual

Set/Get the name of the point data array of the output centerlines holding the unit normal of the section at each point, the centerline tangent. Default: "CenterlineSectionNormal".

◆ SetCenterlineSectionBifurcationArrayName()

virtual void vtkvmtkPolyDataCenterlineBranchSplitting::SetCenterlineSectionBifurcationArrayName ( const char * )
virtual

Set/Get the name of the output cell data array and of the point data array of the output centerlines holding, for each section, whether it is in a bifurcation region (1) or in a single branch (0). Default: "CenterlineSectionBifurcation".

◆ GetCenterlineSectionBifurcationArrayName()

virtual char * vtkvmtkPolyDataCenterlineBranchSplitting::GetCenterlineSectionBifurcationArrayName ( )
virtual

Set/Get the name of the output cell data array and of the point data array of the output centerlines holding, for each section, whether it is in a bifurcation region (1) or in a single branch (0). Default: "CenterlineSectionBifurcation".

◆ RequestData()

int vtkvmtkPolyDataCenterlineBranchSplitting::RequestData ( vtkInformation * ,
vtkInformationVector ** ,
vtkInformationVector *  )
overrideprotectedvirtual

Reimplemented from vtkvmtkPolyDataCenterlineSections.

Definition at line 256 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

260{
261 vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
262 vtkInformation *outInfo = outputVector->GetInformationObject(0);
263
264 vtkPolyData *input = vtkPolyData::SafeDownCast(
265 inInfo->Get(vtkDataObject::DATA_OBJECT()));
266 vtkPolyData *output = vtkPolyData::SafeDownCast(
267 outInfo->Get(vtkDataObject::DATA_OBJECT()));
268
269 if (!this->Centerlines)
270 {
271 vtkErrorMacro(<<"Centerlines not set");
272 return 0;
273 }
274
275 const char* arrayNames[] = {this->CenterlineSectionAreaArrayName, this->CenterlineSectionMinSizeArrayName,
280 for (const char* arrayName : arrayNames)
281 {
282 if (!arrayName)
283 {
284 vtkErrorMacro(<<"An array name is not specified");
285 return 0;
286 }
287 }
288
289 if (!this->Centerlines->GetPointData()->GetArray(this->RadiusArrayName))
290 {
291 vtkErrorMacro(<<"Centerlines have no point data array named " << this->RadiusArrayName);
292 return 0;
293 }
294
295 if (input->GetNumberOfPolys() == 0)
296 {
297 vtkErrorMacro(<<"Input surface has no polygons");
298 return 0;
299 }
300
301 {
302 ProgressStep step(this,"Computing surface normals",PROGRESS_NORMALS,PROGRESS_CLEAN);
303 // vtkPolyDataNormals keeps normals the surface already has, which may point
304 // inward, instead of computing oriented ones
305 vtkNew<vtkPolyData> surface;
306 surface->ShallowCopy(input);
307 surface->GetPointData()->SetActiveNormals(nullptr);
308
309 vtkNew<vtkPolyDataNormals> surfaceNormals;
310 surfaceNormals->SetInputData(surface);
311 surfaceNormals->SplittingOff();
312 surfaceNormals->AutoOrientNormalsOn();
313 surfaceNormals->ComputePointNormalsOn();
314 surfaceNormals->ConsistencyOn();
315 surfaceNormals->Update();
316 this->Surface->DeepCopy(surfaceNormals->GetOutput());
317 }
318 if (this->AbortRequested())
319 {
320 return 1;
321 }
322
323 {
324 ProgressStep step(this,"Merging and smoothing centerlines",PROGRESS_CLEAN,PROGRESS_LABEL_PRELIMINARY);
325 if (!this->GenerateCleanCenterlines())
326 {
327 return 0;
328 }
329
330 this->ComputeTangents();
331
332 if (!this->RefineCapPoints())
333 {
334 return 0;
335 }
336 }
337 if (this->AbortRequested())
338 {
339 return 1;
340 }
341
342 // Whether each centerline point is in a bifurcation region, as found from
343 // its section. Points that get no section count as bifurcation.
344 vtkNew<vtkIntArray> centerlineBifurcation;
345 centerlineBifurcation->SetName(this->CenterlineSectionBifurcationArrayName);
346 centerlineBifurcation->SetNumberOfValues(this->Centerlines->GetNumberOfPoints());
347 centerlineBifurcation->Fill(Bifurcation);
348 this->Centerlines->GetPointData()->AddArray(centerlineBifurcation);
349
350 vtkNew<vtkIntArray> sectionBifurcation;
351 sectionBifurcation->SetName(this->CenterlineSectionBifurcationArrayName);
352 output->GetCellData()->AddArray(sectionBifurcation);
353 vtkNew<vtkIntArray> sectionGlobalNodeId;
354 sectionGlobalNodeId->SetName(this->GlobalNodeIdArrayName);
355 output->GetCellData()->AddArray(sectionGlobalNodeId);
356
357 {
358 ProgressStep step(this,"Labeling surface",PROGRESS_LABEL_PRELIMINARY,PROGRESS_SECTIONS);
359 // Preliminary labels of the surface, which tell whether a section runs
360 // across a boundary between branches
361 if (!this->LabelSurface(BranchIdTmpArrayName,BifurcationIdTmpArrayName))
362 {
363 return 0;
364 }
365 }
366 if (this->AbortRequested())
367 {
368 return 1;
369 }
370
371 std::vector<std::vector<vtkIdType>> pointCells = GetPointCells(this->Centerlines);
372 this->Internals->NumberOfPointCells.resize(pointCells.size());
373 for (size_t i=0; i<pointCells.size(); i++)
374 {
375 this->Internals->NumberOfPointCells[i] = static_cast<vtkIdType>(pointCells[i].size());
376 }
377 this->Internals->SectionBifurcation = sectionBifurcation;
378 this->Internals->SectionGlobalNodeId = sectionGlobalNodeId;
379 this->Internals->CenterlineBifurcation = centerlineBifurcation;
380 this->Internals->CenterlineNormal = this->Centerlines->GetPointData()->GetArray(this->CenterlineSectionNormalArrayName);
381
382 {
383 ProgressStep step(this,"Computing centerline sections",PROGRESS_SECTIONS,PROGRESS_GROUP);
384 this->ComputeCenterlineSections(this->Surface,output);
385 }
386
387 this->Internals->NumberOfPointCells.clear();
388 this->Internals->SectionBifurcation = nullptr;
389 this->Internals->SectionGlobalNodeId = nullptr;
390 this->Internals->CenterlineBifurcation = nullptr;
391 this->Internals->CenterlineNormal = nullptr;
392
393 if (this->AbortRequested())
394 {
395 return 1;
396 }
397
398 {
399 ProgressStep step(this,"Grouping branches and bifurcations",PROGRESS_GROUP,PROGRESS_LABEL);
400 if (!this->CleanBifurcations())
401 {
402 return 0;
403 }
404
405 if (!this->GroupCenterlines())
406 {
407 return 0;
408 }
409 }
410 if (this->AbortRequested())
411 {
412 return 1;
413 }
414
415 {
416 ProgressStep step(this,"Labeling surface",PROGRESS_LABEL,1.0);
417 if (!this->LabelSurface(this->BranchIdArrayName,this->BifurcationIdArrayName) ||
419 {
420 return 0;
421 }
422 }
423
424 this->Centerlines->GetPointData()->RemoveArray(BranchIdTmpArrayName);
425 this->Centerlines->GetPointData()->RemoveArray(BifurcationIdTmpArrayName);
426 this->Surface->GetPointData()->RemoveArray(BranchIdTmpArrayName);
427
428 this->UpdateProgress(1.0);
429 return 1;
430}
bool LabelSurface(const char *labelArrayName, const char *otherArrayName)
void ComputeCenterlineSections(vtkPolyData *input, vtkPolyData *output)

◆ ComputeSectionPlane()

bool vtkvmtkPolyDataCenterlineBranchSplitting::ComputeSectionPlane ( vtkIdType cellId,
vtkIdType cellPointIndex,
double origin[3],
double normal[3] )
overrideprotectedvirtual

Compute the plane of the section at a centerline point, given as the index cellPointIndex of the point within centerline cell cellId. Return false to cut no section at that point. The default places the plane at the point, perpendicular to the average of the directions from the previous and to the next distinct point of the cell, and returns false only if the cell has no point distinct from it. Subclasses can override it, for example to use tangents computed in advance.

Reimplemented from vtkvmtkPolyDataCenterlineSections.

Definition at line 1290 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

1291{
1292 vtkNew<vtkIdList> cellPointIds;
1293 this->Centerlines->GetCellPoints(cellId,cellPointIds);
1294 vtkIdType pointId = cellPointIds->GetId(cellPointIndex);
1295
1296 this->Centerlines->GetPoint(pointId,origin);
1297 this->Internals->CenterlineNormal->GetTuple(pointId,normal);
1298 if (vtkMath::Norm(normal) == 0.0)
1299 {
1300 return false;
1301 }
1302
1303 // Move the plane slightly into the tree at caps, so that it cuts the vessel
1304 // wall rather than the cap
1305 if (this->Internals->NumberOfPointCells[pointId] == 1)
1306 {
1307 const double offset = pointId == 0 ? -1.0e-3 : 1.0e-3;
1308 for (int j=0; j<3; j++)
1309 {
1310 origin[j] -= offset * normal[j];
1311 }
1312 }
1313 return true;
1314}

◆ ExtractSection()

void vtkvmtkPolyDataCenterlineBranchSplitting::ExtractSection ( vtkPolyData * input,
double origin[3],
double normal[3],
vtkPolyData * section,
bool & closed )
overrideprotectedvirtual

Cut input with the plane specified by origin and normal. The default calls vtkvmtkPolyDataBranchSections::ExtractCylinderSection. Subclasses can override it, for example to keep attributes of input on the section. To save time, ComputeCenterlineSections calls it with only the cells of input that the plane crosses, sharing the points and point data of input, so overrides must depend only on the cut of the cells they are given.

Reimplemented from vtkvmtkPolyDataCenterlineSections.

Definition at line 1316 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

1317{
1318 vtkvmtkPolyDataBranchSections::ExtractCylinderSection(input,origin,normal,section,closed,BranchIdTmpArrayName);
1319 // Sections of only a few points are slivers of the surface
1320 if (section->GetNumberOfPoints() < 4)
1321 {
1322 section->Initialize();
1323 }
1324}
static void ExtractCylinderSection(vtkPolyData *cylinder, double origin[3], double normal[3], vtkPolyData *section, bool &closed, const char *idsArrayName=nullptr)

◆ ProcessSection()

void vtkvmtkPolyDataCenterlineBranchSplitting::ProcessSection ( vtkPolyData * input,
vtkIdType pointId,
vtkIdType sectionId,
vtkPolyData * section,
double origin[3],
double normal[3],
bool closed )
overrideprotectedvirtual

Called for each section after it has been added to the output as cell sectionId and its properties have been stored. pointId is the centerline point the section was cut at. The default does nothing. Subclasses can override it to compute and store additional section properties.

Reimplemented from vtkvmtkPolyDataCenterlineSections.

Definition at line 1326 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

1327{
1328 // A section is in a single branch if one centerline passes through it and
1329 // it touches the surface of one branch
1330 int numberOfCenterlines = vtkvmtkPolyDataBranchSections::CountBranchSectionCenterlines(section,this->Centerlines,origin,normal);
1331 int numberOfBranches = vtkvmtkPolyDataBranchSections::CountBranchSectionIds(section,BranchIdTmpArrayName);
1332 int bifurcation = numberOfCenterlines == 1 && numberOfBranches == 1 ? Branch : Bifurcation;
1333
1334 this->Internals->SectionBifurcation->InsertNextValue(bifurcation);
1335 this->Internals->SectionGlobalNodeId->InsertNextValue(static_cast<int>(pointId));
1336 this->Internals->CenterlineBifurcation->SetValue(pointId,bifurcation);
1337}
static int CountBranchSectionIds(vtkPolyData *section, const char *idsArrayName)
static int CountBranchSectionCenterlines(vtkPolyData *section, vtkPolyData *centerlines, double origin[3], double normal[3])

◆ GenerateCleanCenterlines()

bool vtkvmtkPolyDataCenterlineBranchSplitting::GenerateCleanCenterlines ( )
protected

Merge the input centerlines into a tree of two-point lines, numbered from the inlet, with a temporary branch and bifurcation classification of each point, and smooth each branch.

Definition at line 432 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

433{
434 vtkNew<vtkCleanPolyData> cleaner;
435 cleaner->SetInputData(this->Centerlines);
436 cleaner->PointMergingOn();
437 cleaner->Update();
438 vtkPolyData* centerlines = cleaner->GetOutput();
439
440 this->NumberOfCenterlines = centerlines->GetNumberOfCells();
441 if (this->NumberOfCenterlines == 0)
442 {
443 vtkErrorMacro(<<"Centerlines have no cells");
444 return false;
445 }
446
447 if (!IsOnePiece(centerlines))
448 {
449 vtkErrorMacro(<<"Centerlines consist of more than one piece");
450 return false;
451 }
452
453 const vtkIdType numberOfPoints = centerlines->GetNumberOfPoints();
454 vtkDataArray* inputRadius = centerlines->GetPointData()->GetArray(this->RadiusArrayName);
455
456 vtkNew<vtkPoints> points;
457 vtkNew<vtkCellArray> lines;
458
459 vtkNew<vtkDoubleArray> radius;
460 radius->SetName(this->RadiusArrayName);
461 radius->SetNumberOfValues(numberOfPoints);
462 radius->Fill(0.0);
463
464 vtkNew<vtkIntArray> globalNodeId;
465 globalNodeId->SetName(this->GlobalNodeIdArrayName);
466 globalNodeId->SetNumberOfValues(numberOfPoints);
467 globalNodeId->Fill(0);
468
469 vtkNew<vtkIntArray> centerlineId;
470 centerlineId->SetName(this->CenterlineIdArrayName);
471 centerlineId->SetNumberOfComponents(this->NumberOfCenterlines);
472 centerlineId->SetNumberOfTuples(numberOfPoints);
473 centerlineId->Fill(0);
474
475 // Number the points in the order the centerlines reach them, starting from
476 // the inlet, and connect each new point to the previous one on its
477 // centerline. Points shared with an earlier centerline are not repeated.
478 std::vector<vtkIdType> newPointIds(numberOfPoints,-1);
479 newPointIds[0] = points->InsertNextPoint(centerlines->GetPoint(0));
480 radius->SetValue(0,inputRadius->GetTuple1(0));
481
482 vtkNew<vtkIdList> cellPointIds;
483 for (vtkIdType c=0; c<this->NumberOfCenterlines; c++)
484 {
485 centerlines->GetCellPoints(c,cellPointIds);
486 if (cellPointIds->GetNumberOfIds() == 0 || newPointIds[cellPointIds->GetId(0)] < 0)
487 {
488 vtkErrorMacro(<<"Centerlines must all start from the same inlet point");
489 return false;
490 }
491 for (vtkIdType p=0; p<cellPointIds->GetNumberOfIds(); p++)
492 {
493 vtkIdType id = cellPointIds->GetId(p);
494 if (newPointIds[id] < 0)
495 {
496 vtkIdType newId = points->InsertNextPoint(centerlines->GetPoint(id));
497 newPointIds[id] = newId;
498 vtkIdType line[2] = {newPointIds[cellPointIds->GetId(p-1)], newId};
499 lines->InsertNextCell(2,line);
500 radius->SetValue(newId,inputRadius->GetTuple1(id));
501 globalNodeId->SetValue(newId,newId);
502 }
503 centerlineId->SetComponent(newPointIds[id],c,1);
504 }
505 }
506
507 vtkNew<vtkPolyData> polyData;
508 polyData->SetPoints(points);
509 polyData->SetLines(lines);
510
511 if (polyData->GetNumberOfPoints() != numberOfPoints)
512 {
513 vtkErrorMacro(<<"Centerlines have points that belong to no centerline");
514 return false;
515 }
516
517 if (polyData->GetNumberOfPoints() != polyData->GetNumberOfCells() + 1)
518 {
519 vtkErrorMacro(<<"Centerlines do not form a tree");
520 return false;
521 }
522
523 // Preliminary branches: a new branch starts after each outlet and each
524 // point where the centerlines split
525 vtkNew<vtkIntArray> bifurcationIds;
526 bifurcationIds->SetName(BifurcationIdTmpArrayName);
527 bifurcationIds->SetNumberOfValues(numberOfPoints);
528 bifurcationIds->Fill(Undefined);
529 vtkNew<vtkIntArray> branchIds;
530 branchIds->SetName(BranchIdTmpArrayName);
531 branchIds->SetNumberOfValues(numberOfPoints);
532 branchIds->Fill(Undefined);
533
534 polyData->GetPointData()->AddArray(bifurcationIds);
535 polyData->GetPointData()->AddArray(branchIds);
536 polyData->GetPointData()->AddArray(radius);
537 polyData->GetPointData()->AddArray(globalNodeId);
538 polyData->GetPointData()->AddArray(centerlineId);
539
540 std::vector<std::vector<vtkIdType>> pointCells = GetPointCells(polyData);
541
542 int numberOfBranches = 0;
543 for (vtkIdType p=0; p<numberOfPoints; p++)
544 {
545 branchIds->SetValue(p,numberOfBranches);
546 if (pointCells[p].size() == 1 && p != 0)
547 {
548 numberOfBranches++;
549 }
550 else if (pointCells[p].size() > 2)
551 {
552 bifurcationIds->SetValue(p,Bifurcation);
553 numberOfBranches++;
554 }
555 }
556
557 vtkNew<vtkPointLocator> locator;
558 BuildPointLocator(polyData,locator);
559 vtkNew<vtkIdList> closePoints;
560 double point[3];
561
562 // Points of the branches leaving a bifurcation that are within the
563 // inscribed sphere of the bifurcation point are part of the bifurcation
564 for (vtkIdType i=0; i<numberOfPoints; i++)
565 {
566 if (pointCells[i].size() <= 2)
567 {
568 continue;
569 }
570 int upstreamBranchId = branchIds->GetValue(i);
571 std::set<int> downstreamBranchIds;
572 for (vtkIdType cellId : pointCells[i])
573 {
574 polyData->GetCellPoints(cellId,cellPointIds);
575 for (vtkIdType k=0; k<cellPointIds->GetNumberOfIds(); k++)
576 {
577 int id = branchIds->GetValue(cellPointIds->GetId(k));
578 if (id != upstreamBranchId)
579 {
580 downstreamBranchIds.insert(id);
581 }
582 }
583 }
584 polyData->GetPoint(i,point);
585 locator->FindPointsWithinRadius(radius->GetValue(i),point,closePoints);
586 for (vtkIdType k=0; k<closePoints->GetNumberOfIds(); k++)
587 {
588 vtkIdType closePointId = closePoints->GetId(k);
589 if (downstreamBranchIds.count(branchIds->GetValue(closePointId)))
590 {
591 bifurcationIds->SetValue(closePointId,BifurcationDownstream);
592 }
593 }
594 }
595
596 // Points within two inscribed sphere radii of a cap are smoothed more
597 // strongly, perpendicular to the centerline, to remove the wiggles often
598 // seen there
599 std::vector<bool> nearCap(numberOfPoints,false);
600 for (vtkIdType i=0; i<numberOfPoints; i++)
601 {
602 if (pointCells[i].size() != 1)
603 {
604 continue;
605 }
606 polyData->GetPoint(i,point);
607 locator->FindPointsWithinRadius(2.0 * radius->GetValue(i),point,closePoints);
608 for (vtkIdType k=0; k<closePoints->GetNumberOfIds(); k++)
609 {
610 vtkIdType closePointId = closePoints->GetId(k);
611 if (branchIds->GetValue(closePointId) == branchIds->GetValue(i))
612 {
613 nearCap[closePointId] = true;
614 }
615 }
616 }
617
618 // Moving average along each branch. Points of a branch are numbered
619 // consecutively, and only points whose two neighbors are in the same branch
620 // are moved.
621 const int numberOfIterations = 200;
622 const double capRelaxation = 1.0;
623 const double relaxation = 0.01;
624 double point0[3], point1[3], point2[3], displacement[3], tangent[3];
625 for (int iteration=0; iteration<numberOfIterations; iteration++)
626 {
627 for (vtkIdType k=1; k<numberOfPoints-1; k++)
628 {
629 int branchId = branchIds->GetValue(k);
630 if (branchIds->GetValue(k-1) != branchId || branchIds->GetValue(k+1) != branchId)
631 {
632 continue;
633 }
634 points->GetPoint(k-1,point0);
635 points->GetPoint(k,point1);
636 points->GetPoint(k+1,point2);
637 for (int l=0; l<3; l++)
638 {
639 displacement[l] = 0.5 * (point0[l] + point2[l]) - point1[l];
640 }
641 if (nearCap[k])
642 {
643 double distance01 = sqrt(vtkMath::Distance2BetweenPoints(point0,point1));
644 double distance12 = sqrt(vtkMath::Distance2BetweenPoints(point1,point2));
645 for (int l=0; l<3; l++)
646 {
647 tangent[l] = (point1[l] - point0[l]) / distance01 + (point2[l] - point1[l]) / distance12;
648 }
649 vtkMath::Normalize(tangent);
650 double tangentialDisplacement = vtkMath::Dot(displacement,tangent);
651 for (int l=0; l<3; l++)
652 {
653 point1[l] += capRelaxation * (displacement[l] - tangentialDisplacement * tangent[l]);
654 }
655 }
656 else
657 {
658 for (int l=0; l<3; l++)
659 {
660 point1[l] += relaxation * displacement[l];
661 }
662 }
663 points->SetPoint(k,point1);
664 }
665 }
666
667 this->Centerlines->DeepCopy(polyData);
668 return true;
669}

◆ ComputeTangents()

void vtkvmtkPolyDataCenterlineBranchSplitting::ComputeTangents ( )
protected

Compute the unit tangent at each centerline point. At caps, the normal of the nearest surface point is used, pointing into the tree at the inlet and out of it at the outlets.

Definition at line 671 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

672{
673 const vtkIdType numberOfPoints = this->Centerlines->GetNumberOfPoints();
674 vtkNew<vtkDoubleArray> tangents;
675 tangents->SetName(this->CenterlineSectionNormalArrayName);
676 tangents->SetNumberOfComponents(3);
677 tangents->SetNumberOfTuples(numberOfPoints);
678
679 vtkDataArray* surfaceNormals = this->Surface->GetPointData()->GetNormals();
680 vtkNew<vtkPointLocator> locator;
681 BuildPointLocator(this->Surface,locator);
682
683 std::vector<std::vector<vtkIdType>> pointCells = GetPointCells(this->Centerlines);
684 vtkNew<vtkIdList> cellPointIds;
685 double point[3], point0[3], point1[3], direction[3];
686 for (vtkIdType p=0; p<numberOfPoints; p++)
687 {
688 double tangent[3] = {0.0, 0.0, 0.0};
689 if (pointCells[p].size() == 1)
690 {
691 // A cap: use the normal of the surface, which points out of it, and
692 // flip it at the inlet so that tangents follow the tree
693 this->Centerlines->GetPoint(p,point);
694 surfaceNormals->GetTuple(locator->FindClosestPoint(point),tangent);
695 if (p == 0)
696 {
697 vtkMath::MultiplyScalar(tangent,-1.0);
698 }
699 }
700 else
701 {
702 for (vtkIdType cellId : pointCells[p])
703 {
704 this->Centerlines->GetCellPoints(cellId,cellPointIds);
705 this->Centerlines->GetPoint(cellPointIds->GetId(0),point0);
706 this->Centerlines->GetPoint(cellPointIds->GetId(1),point1);
707 vtkMath::Subtract(point1,point0,direction);
708 vtkMath::Normalize(direction);
709 vtkMath::Add(tangent,direction,tangent);
710 }
711 vtkMath::Normalize(tangent);
712 }
713 tangents->SetTuple(p,tangent);
714 }
715
716 this->Centerlines->GetPointData()->AddArray(tangents);
717}

◆ RefineCapPoints()

bool vtkvmtkPolyDataCenterlineBranchSplitting::RefineCapPoints ( )
protected

Insert a point halfway between each cap and its neighbor.

Definition at line 719 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

720{
721 vtkPolyData* centerlines = this->Centerlines;
722 const vtkIdType numberOfPoints = centerlines->GetNumberOfPoints();
723 std::vector<std::vector<vtkIdType>> pointCells = GetPointCells(centerlines);
724
725 vtkDataArray* radius = centerlines->GetPointData()->GetArray(this->RadiusArrayName);
726 vtkDataArray* tangents = centerlines->GetPointData()->GetArray(this->CenterlineSectionNormalArrayName);
727 vtkDataArray* bifurcationIds = centerlines->GetPointData()->GetArray(BifurcationIdTmpArrayName);
728 vtkDataArray* branchIds = centerlines->GetPointData()->GetArray(BranchIdTmpArrayName);
729 vtkDataArray* centerlineId = centerlines->GetPointData()->GetArray(this->CenterlineIdArrayName);
730
731 // New point ids: a cap is preceded by the new point at the outlets and
732 // followed by it at the inlet, so that ids keep increasing along the tree
733 std::vector<vtkIdType> newPointIds(numberOfPoints,-1);
734 std::vector<vtkIdType> newCapNeighborIds(numberOfPoints,-1);
735 vtkIdType numberOfNewPoints = 0;
736 for (vtkIdType i=0; i<numberOfPoints; i++)
737 {
738 if (pointCells[i].size() != 1)
739 {
740 newPointIds[i] = numberOfNewPoints++;
741 }
742 else if (i == 0)
743 {
744 newPointIds[i] = numberOfNewPoints++;
745 newCapNeighborIds[i] = numberOfNewPoints++;
746 }
747 else
748 {
749 newCapNeighborIds[i] = numberOfNewPoints++;
750 newPointIds[i] = numberOfNewPoints++;
751 }
752 }
753
754 vtkNew<vtkPoints> points;
755 points->SetNumberOfPoints(numberOfNewPoints);
756
757 vtkNew<vtkDoubleArray> newRadius;
758 newRadius->SetName(this->RadiusArrayName);
759 newRadius->SetNumberOfValues(numberOfNewPoints);
760 vtkNew<vtkDoubleArray> newTangents;
761 newTangents->SetName(this->CenterlineSectionNormalArrayName);
762 newTangents->SetNumberOfComponents(3);
763 newTangents->SetNumberOfTuples(numberOfNewPoints);
764 vtkNew<vtkIntArray> newBifurcationIds;
765 newBifurcationIds->SetName(BifurcationIdTmpArrayName);
766 newBifurcationIds->SetNumberOfValues(numberOfNewPoints);
767 vtkNew<vtkIntArray> newBranchIds;
768 newBranchIds->SetName(BranchIdTmpArrayName);
769 newBranchIds->SetNumberOfValues(numberOfNewPoints);
770 vtkNew<vtkIntArray> newGlobalNodeId;
771 newGlobalNodeId->SetName(this->GlobalNodeIdArrayName);
772 newGlobalNodeId->SetNumberOfValues(numberOfNewPoints);
773 vtkNew<vtkIntArray> newCenterlineId;
774 newCenterlineId->SetName(this->CenterlineIdArrayName);
775 newCenterlineId->SetNumberOfComponents(this->NumberOfCenterlines);
776 newCenterlineId->SetNumberOfTuples(numberOfNewPoints);
777
778 vtkNew<vtkIdList> cellPointIds;
779 double point[3], neighborPoint[3], tangent[3], neighborTangent[3];
780 for (vtkIdType i=0; i<numberOfPoints; i++)
781 {
782 centerlines->GetPoint(i,point);
783 tangents->GetTuple(i,tangent);
784
785 std::vector<vtkIdType> ids = {newPointIds[i]};
786 if (newCapNeighborIds[i] >= 0)
787 {
788 ids.push_back(newCapNeighborIds[i]);
789 }
790 for (vtkIdType id : ids)
791 {
792 newBifurcationIds->SetValue(id,static_cast<int>(bifurcationIds->GetTuple1(i)));
793 newBranchIds->SetValue(id,static_cast<int>(branchIds->GetTuple1(i)));
794 newCenterlineId->SetTuple(id,i,centerlineId);
795 newGlobalNodeId->SetValue(id,static_cast<int>(id));
796 }
797
798 points->SetPoint(newPointIds[i],point);
799 newRadius->SetValue(newPointIds[i],radius->GetTuple1(i));
800 newTangents->SetTuple(newPointIds[i],tangent);
801
802 if (newCapNeighborIds[i] < 0)
803 {
804 continue;
805 }
806 // The new point is halfway to the other point of the cap's line
807 centerlines->GetCellPoints(pointCells[i][0],cellPointIds);
808 vtkIdType neighborId = cellPointIds->GetId(0) == i ? cellPointIds->GetId(1) : cellPointIds->GetId(0);
809 centerlines->GetPoint(neighborId,neighborPoint);
810 tangents->GetTuple(neighborId,neighborTangent);
811 double newPoint[3], newTangent[3];
812 for (int j=0; j<3; j++)
813 {
814 newPoint[j] = 0.5 * (point[j] + neighborPoint[j]);
815 newTangent[j] = 0.5 * (tangent[j] + neighborTangent[j]);
816 }
817 vtkMath::Normalize(newTangent);
818 points->SetPoint(newCapNeighborIds[i],newPoint);
819 newTangents->SetTuple(newCapNeighborIds[i],newTangent);
820 newRadius->SetValue(newCapNeighborIds[i],0.5 * (radius->GetTuple1(i) + radius->GetTuple1(neighborId)));
821 }
822
823 // Lines keep the order of the cells, with the line to a new point inserted
824 // next to the line of its cap
825 vtkNew<vtkCellArray> lines;
826 if (newCapNeighborIds[0] >= 0)
827 {
828 vtkIdType line[2] = {newPointIds[0], newCapNeighborIds[0]};
829 lines->InsertNextCell(2,line);
830 }
831 for (vtkIdType cellId=0; cellId<centerlines->GetNumberOfCells(); cellId++)
832 {
833 centerlines->GetCellPoints(cellId,cellPointIds);
834 vtkIdType pointId0 = cellPointIds->GetId(0);
835 vtkIdType pointId1 = cellPointIds->GetId(1);
836 if (pointId1 == 0 || (pointId0 != 0 && newCapNeighborIds[pointId0] >= 0))
837 {
838 vtkErrorMacro(<<"Centerline lines are not oriented from the inlet");
839 return false;
840 }
841 vtkIdType newPointId0 = pointId0 == 0 && newCapNeighborIds[0] >= 0 ? newCapNeighborIds[0] : newPointIds[pointId0];
842 if (newCapNeighborIds[pointId1] >= 0)
843 {
844 vtkIdType line0[2] = {newPointId0, newCapNeighborIds[pointId1]};
845 vtkIdType line1[2] = {newCapNeighborIds[pointId1], newPointIds[pointId1]};
846 lines->InsertNextCell(2,line0);
847 lines->InsertNextCell(2,line1);
848 }
849 else
850 {
851 vtkIdType line[2] = {newPointId0, newPointIds[pointId1]};
852 lines->InsertNextCell(2,line);
853 }
854 }
855
856 vtkNew<vtkPolyData> refined;
857 refined->SetPoints(points);
858 refined->SetLines(lines);
859 refined->GetPointData()->AddArray(newBifurcationIds);
860 refined->GetPointData()->AddArray(newBranchIds);
861 refined->GetPointData()->AddArray(newRadius);
862 refined->GetPointData()->AddArray(newCenterlineId);
863 refined->GetPointData()->AddArray(newGlobalNodeId);
864 refined->GetPointData()->AddArray(newTangents);
865
866 this->Centerlines->DeepCopy(refined);
867 return true;
868}

◆ LabelSurface()

bool vtkvmtkPolyDataCenterlineBranchSplitting::LabelSurface ( const char * labelArrayName,
const char * otherArrayName )
protected

Label each surface point with the id in the centerline point data array labelArrayName of the nearest centerline point in front of it for which the array otherArrayName is -1.

Definition at line 870 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

871{
872 vtkDataArray* centerlineLabels = this->Centerlines->GetPointData()->GetArray(labelArrayName);
873 vtkDataArray* centerlineOtherLabels = this->Centerlines->GetPointData()->GetArray(otherArrayName);
874 if (!centerlineLabels || !centerlineOtherLabels)
875 {
876 vtkErrorMacro(<<"Centerlines have no point data array named " << (centerlineLabels ? otherArrayName : labelArrayName));
877 return false;
878 }
879
880 const vtkIdType numberOfSurfacePoints = this->Surface->GetNumberOfPoints();
881 vtkNew<vtkIntArray> surfaceLabels;
882 surfaceLabels->SetName(labelArrayName);
883 surfaceLabels->SetNumberOfValues(numberOfSurfacePoints);
884 surfaceLabels->Fill(-1);
885 std::vector<double> labelDistances(numberOfSurfacePoints,-1.0);
886
887 vtkNew<vtkPointLocator> locator;
888 BuildPointLocator(this->Surface,locator);
889
890 vtkDataArray* radius = this->Centerlines->GetPointData()->GetArray(this->RadiusArrayName);
891 vtkDataArray* surfaceNormals = this->Surface->GetPointData()->GetNormals();
892
893 vtkNew<vtkIdList> surfacePointIds;
894 double centerlinePoint[3], surfacePoint[3], normal[3], offset[3];
895 for (vtkIdType i=0; i<this->Centerlines->GetNumberOfPoints(); i++)
896 {
897 if (centerlineOtherLabels->GetTuple1(i) != -1)
898 {
899 continue;
900 }
901 int label = static_cast<int>(centerlineLabels->GetTuple1(i));
902
903 this->Centerlines->GetPoint(i,centerlinePoint);
904 locator->FindPointsWithinRadius(10.0 * radius->GetTuple1(i),centerlinePoint,surfacePointIds);
905 for (vtkIdType j=0; j<surfacePointIds->GetNumberOfIds(); j++)
906 {
907 vtkIdType surfacePointId = surfacePointIds->GetId(j);
908 this->Surface->GetPoint(surfacePointId,surfacePoint);
909 surfaceNormals->GetTuple(surfacePointId,normal);
910 vtkMath::Subtract(surfacePoint,centerlinePoint,offset);
911 double distance = vtkMath::Norm(offset);
912 // Only surface points that face the centerline point from the outside
913 // TODO: the tolerance is in absolute units
914 if (vtkMath::Dot(offset,normal) < -1.0e-2)
915 {
916 continue;
917 }
918 if (surfaceLabels->GetValue(surfacePointId) > -1 && distance > labelDistances[surfacePointId])
919 {
920 continue;
921 }
922 surfaceLabels->SetValue(surfacePointId,label);
923 labelDistances[surfacePointId] = distance;
924 }
925 }
926
927 this->Surface->GetPointData()->AddArray(surfaceLabels);
928 return true;
929}

◆ CleanBifurcations()

bool vtkvmtkPolyDataCenterlineBranchSplitting::CleanBifurcations ( )
protected

Correct the bifurcation classification of the sections: bifurcation regions touching a single branch are removed, and single points left between bifurcations and next to caps are reclassified.

Definition at line 931 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

932{
933 vtkPolyData* centerlines = this->Centerlines;
934 const vtkIdType numberOfPoints = centerlines->GetNumberOfPoints();
935
936 vtkIntArray* bifurcation = vtkIntArray::SafeDownCast(centerlines->GetPointData()->GetArray(this->CenterlineSectionBifurcationArrayName));
937 vtkDataArray* bifurcationIds = centerlines->GetPointData()->GetArray(BifurcationIdTmpArrayName);
938
939 vtkNew<vtkIntArray> remove;
940 remove->SetName(RemoveArrayName);
941 remove->SetNumberOfValues(numberOfPoints);
942 remove->Fill(0);
943 centerlines->GetPointData()->AddArray(remove);
944
945 // Points where the centerlines split are always in a bifurcation region, so
946 // that each bifurcation region is connected
947 for (vtkIdType i=0; i<numberOfPoints; i++)
948 {
949 if (bifurcationIds->GetTuple1(i) == Bifurcation)
950 {
951 bifurcation->SetValue(i,Bifurcation);
952 }
953 }
954
955 vtkNew<vtkPolyData> bifurcations;
956 vtkNew<vtkPolyData> branches;
957 this->SplitCenterlines(bifurcations,branches);
958
959 // A bifurcation region whose points are all in one preliminary branch is in
960 // the middle of a branch: it becomes branch again, and its points other
961 // than caps are removed
962 if (bifurcations->GetNumberOfCells() > 0)
963 {
964 vtkNew<vtkConnectivityFilter> connectivity;
965 connectivity->SetInputData(bifurcations);
966 connectivity->SetExtractionModeToAllRegions();
967 connectivity->ColorRegionsOn();
968 connectivity->Update();
969
970 vtkNew<vtkThreshold> threshold;
971 threshold->SetInputConnection(connectivity->GetOutputPort());
972 threshold->SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_CELLS,RegionIdArrayName);
973 threshold->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN);
974
975 vtkNew<vtkIdList> cellPointIds;
976 for (vtkIdType regionId=0; regionId<connectivity->GetNumberOfExtractedRegions(); regionId++)
977 {
978 threshold->SetLowerThreshold(regionId);
979 threshold->SetUpperThreshold(regionId);
980 threshold->Update();
981 vtkUnstructuredGrid* region = threshold->GetOutput();
982 vtkDataArray* regionBranchIds = region->GetPointData()->GetArray(BranchIdTmpArrayName);
983 vtkDataArray* regionGlobalNodeIds = region->GetPointData()->GetArray(this->GlobalNodeIdArrayName);
984
985 std::set<int> branchIdsInRegion;
986 for (vtkIdType j=0; j<region->GetNumberOfPoints(); j++)
987 {
988 branchIdsInRegion.insert(static_cast<int>(regionBranchIds->GetTuple1(j)));
989 }
990 if (branchIdsInRegion.size() != 1)
991 {
992 continue;
993 }
994
995 std::vector<int> numberOfRegionPointCells(region->GetNumberOfPoints(),0);
996 for (vtkIdType cellId=0; cellId<region->GetNumberOfCells(); cellId++)
997 {
998 region->GetCellPoints(cellId,cellPointIds);
999 for (vtkIdType k=0; k<cellPointIds->GetNumberOfIds(); k++)
1000 {
1001 numberOfRegionPointCells[cellPointIds->GetId(k)]++;
1002 }
1003 }
1004 for (vtkIdType j=0; j<region->GetNumberOfPoints(); j++)
1005 {
1006 vtkIdType pointId = static_cast<vtkIdType>(regionGlobalNodeIds->GetTuple1(j));
1007 bifurcation->SetValue(pointId,Branch);
1008 if (numberOfRegionPointCells[j] != 1)
1009 {
1010 remove->SetValue(pointId,1);
1011 }
1012 }
1013 }
1014 }
1015
1016 // A branch point with no branch neighbor between bifurcations is part of
1017 // the bifurcation
1018 std::vector<std::vector<vtkIdType>> pointCells = GetPointCells(centerlines);
1019 vtkNew<vtkIdList> cellPointIds;
1020 for (vtkIdType i=0; i<numberOfPoints; i++)
1021 {
1022 if (bifurcation->GetValue(i) != Branch)
1023 {
1024 continue;
1025 }
1026 bool isolated = true;
1027 for (vtkIdType cellId : pointCells[i])
1028 {
1029 centerlines->GetCellPoints(cellId,cellPointIds);
1030 for (vtkIdType k=0; k<cellPointIds->GetNumberOfIds(); k++)
1031 {
1032 vtkIdType id = cellPointIds->GetId(k);
1033 if (id != i && bifurcation->GetValue(id) == Branch)
1034 {
1035 isolated = false;
1036 }
1037 }
1038 }
1039 if (isolated)
1040 {
1041 bifurcation->SetValue(i,Bifurcation);
1042 }
1043 }
1044
1045 // The two points at each cap are in a branch
1046 bifurcation->SetValue(0,Branch);
1047 bifurcation->SetValue(1,Branch);
1048 for (vtkIdType i=1; i<numberOfPoints; i++)
1049 {
1050 if (pointCells[i].size() == 1)
1051 {
1052 bifurcation->SetValue(i-1,Branch);
1053 bifurcation->SetValue(i,Branch);
1054 }
1055 }
1056
1057 // Remove the points marked for removal with the lines that use them
1058 vtkNew<vtkPointDataToCellData> pointToCellData;
1059 pointToCellData->SetInputData(centerlines);
1060 pointToCellData->PassPointDataOn();
1061
1062 vtkNew<vtkThreshold> threshold;
1063 threshold->SetInputConnection(pointToCellData->GetOutputPort());
1064 threshold->SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_CELLS,RemoveArrayName);
1065 threshold->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN);
1066 threshold->SetLowerThreshold(0.0);
1067 threshold->SetUpperThreshold(0.0);
1068
1069 threshold->Update();
1070 vtkNew<vtkPolyData> kept;
1071 LinesToPolyData(threshold->GetOutput(),kept);
1072
1073 // Points keep their order, so a gap in the old point ids is where points
1074 // were removed: connect the points on either side of it
1075 vtkDataArray* oldGlobalNodeIds = kept->GetPointData()->GetArray(this->GlobalNodeIdArrayName);
1076 vtkNew<vtkCellArray> lines;
1077 lines->DeepCopy(kept->GetLines());
1078 vtkNew<vtkIntArray> globalNodeIds;
1079 globalNodeIds->SetName(this->GlobalNodeIdArrayName);
1080 globalNodeIds->SetNumberOfValues(kept->GetNumberOfPoints());
1081 if (kept->GetNumberOfPoints() > 0)
1082 {
1083 globalNodeIds->SetValue(0,0);
1084 }
1085 for (vtkIdType i=1; i<kept->GetNumberOfPoints(); i++)
1086 {
1087 if (oldGlobalNodeIds->GetTuple1(i-1) + 1 != oldGlobalNodeIds->GetTuple1(i))
1088 {
1089 vtkIdType line[2] = {i-1, i};
1090 lines->InsertNextCell(2,line);
1091 }
1092 globalNodeIds->SetValue(i,static_cast<int>(i));
1093 }
1094
1095 vtkNew<vtkPolyData> cleaned;
1096 cleaned->SetPoints(kept->GetPoints());
1097 cleaned->SetLines(lines);
1098 cleaned->GetPointData()->ShallowCopy(kept->GetPointData());
1099 cleaned->GetPointData()->RemoveArray(RemoveArrayName);
1100 cleaned->GetPointData()->AddArray(globalNodeIds);
1101
1102 if (cleaned->GetNumberOfPoints() != cleaned->GetNumberOfCells() + 1)
1103 {
1104 vtkErrorMacro(<<"Centerlines do not form a tree after removing bifurcation regions within branches");
1105 return false;
1106 }
1107
1108 this->Centerlines->DeepCopy(cleaned);
1109 return true;
1110}
void SplitCenterlines(vtkPolyData *bifurcations, vtkPolyData *branches)

◆ GroupCenterlines()

bool vtkvmtkPolyDataCenterlineBranchSplitting::GroupCenterlines ( )
protected

Split the centerlines into branches and bifurcations, number them and compute the path along each.

Definition at line 1212 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

1213{
1214 vtkNew<vtkPolyData> bifurcations;
1215 vtkNew<vtkPolyData> branches;
1216 this->SplitCenterlines(bifurcations,branches);
1217
1218 vtkNew<vtkAppendFilter> append;
1219 append->MergePointsOn();
1220 if (bifurcations->GetNumberOfCells() > 0)
1221 {
1222 this->LabelConnectedRegions(bifurcations,this->BifurcationIdArrayName,this->BranchIdArrayName);
1223 append->AddInputData(bifurcations);
1224 }
1225 if (branches->GetNumberOfCells() > 0)
1226 {
1228 append->AddInputData(branches);
1229 }
1230 if (append->GetNumberOfInputConnections(0) == 0)
1231 {
1232 vtkErrorMacro(<<"Centerlines have no lines left");
1233 return false;
1234 }
1235
1236 append->Update();
1237 vtkNew<vtkPolyData> merged;
1238 LinesToPolyData(append->GetOutput(),merged);
1239
1240 if (!IsOnePiece(merged))
1241 {
1242 vtkErrorMacro(<<"Centerlines consist of more than one piece after grouping");
1243 return false;
1244 }
1245
1246 // Put the points back in the order of their ids
1247 const vtkIdType numberOfPoints = merged->GetNumberOfPoints();
1248 vtkDataArray* globalNodeIds = merged->GetPointData()->GetArray(this->GlobalNodeIdArrayName);
1249 std::vector<vtkIdType> mergedPointIds(numberOfPoints,-1);
1250 for (vtkIdType i=0; i<numberOfPoints; i++)
1251 {
1252 vtkIdType id = static_cast<vtkIdType>(globalNodeIds->GetTuple1(i));
1253 if (id < 0 || id >= numberOfPoints || mergedPointIds[id] >= 0)
1254 {
1255 vtkErrorMacro(<<"Centerline point ids are not unique after grouping");
1256 return false;
1257 }
1258 mergedPointIds[id] = i;
1259 }
1260
1261 vtkNew<vtkPoints> points;
1262 points->SetNumberOfPoints(numberOfPoints);
1263 vtkNew<vtkPolyData> ordered;
1264 ordered->GetPointData()->CopyAllocate(merged->GetPointData(),numberOfPoints);
1265 for (vtkIdType id=0; id<numberOfPoints; id++)
1266 {
1267 points->SetPoint(id,merged->GetPoint(mergedPointIds[id]));
1268 ordered->GetPointData()->CopyData(merged->GetPointData(),mergedPointIds[id],id);
1269 }
1270
1271 vtkNew<vtkCellArray> lines;
1272 vtkNew<vtkIdList> cellPointIds;
1273 for (vtkIdType cellId=0; cellId<merged->GetNumberOfCells(); cellId++)
1274 {
1275 merged->GetCellPoints(cellId,cellPointIds);
1276 lines->InsertNextCell(cellPointIds->GetNumberOfIds());
1277 for (vtkIdType k=0; k<cellPointIds->GetNumberOfIds(); k++)
1278 {
1279 lines->InsertCellPoint(static_cast<vtkIdType>(globalNodeIds->GetTuple1(cellPointIds->GetId(k))));
1280 }
1281 }
1282
1283 ordered->SetPoints(points);
1284 ordered->SetLines(lines);
1285
1286 this->Centerlines->DeepCopy(ordered);
1287 return true;
1288}
void LabelConnectedRegions(vtkPolyData *lines, const char *labelArrayName, const char *otherArrayName)

◆ SplitCenterlines()

void vtkvmtkPolyDataCenterlineBranchSplitting::SplitCenterlines ( vtkPolyData * bifurcations,
vtkPolyData * branches )
protected

Extract the cells of the centerlines in bifurcation regions and in branches.

Definition at line 1112 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

1113{
1114 // A line is in a bifurcation region if either of its points is
1115 vtkDataArray* pointBifurcation = this->Centerlines->GetPointData()->GetArray(this->CenterlineSectionBifurcationArrayName);
1116 vtkNew<vtkIntArray> cellBifurcation;
1117 cellBifurcation->SetName(this->CenterlineSectionBifurcationArrayName);
1118 cellBifurcation->SetNumberOfValues(this->Centerlines->GetNumberOfCells());
1119 vtkNew<vtkIdList> cellPointIds;
1120 for (vtkIdType cellId=0; cellId<this->Centerlines->GetNumberOfCells(); cellId++)
1121 {
1122 this->Centerlines->GetCellPoints(cellId,cellPointIds);
1123 int value = Branch;
1124 for (vtkIdType k=0; k<cellPointIds->GetNumberOfIds(); k++)
1125 {
1126 if (pointBifurcation->GetTuple1(cellPointIds->GetId(k)) == Bifurcation)
1127 {
1128 value = Bifurcation;
1129 }
1130 }
1131 cellBifurcation->SetValue(cellId,value);
1132 }
1133 this->Centerlines->GetCellData()->AddArray(cellBifurcation);
1134
1135 vtkNew<vtkThreshold> threshold;
1136 threshold->SetInputData(this->Centerlines);
1137 threshold->SetThresholdFunction(vtkThreshold::THRESHOLD_BETWEEN);
1138 threshold->SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_CELLS,this->CenterlineSectionBifurcationArrayName);
1139
1140 for (int value : {Branch, Bifurcation})
1141 {
1142 threshold->SetLowerThreshold(value);
1143 threshold->SetUpperThreshold(value);
1144 threshold->Update();
1145 LinesToPolyData(threshold->GetOutput(),value == Branch ? branches : bifurcations);
1146 }
1147}

◆ LabelConnectedRegions()

void vtkvmtkPolyDataCenterlineBranchSplitting::LabelConnectedRegions ( vtkPolyData * lines,
const char * labelArrayName,
const char * otherArrayName )
protected

Number the connected regions of lines in labelArrayName, set otherArrayName to -1 and compute the path along each region.

Definition at line 1149 of file vtkvmtkPolyDataCenterlineBranchSplitting.cxx.

1150{
1151 vtkNew<vtkConnectivityFilter> connectivity;
1152 connectivity->SetInputData(lines);
1153 connectivity->SetExtractionModeToAllRegions();
1154 connectivity->ColorRegionsOn();
1155 connectivity->Update();
1156
1157 vtkNew<vtkPolyData> labeled;
1158 labeled->DeepCopy(connectivity->GetOutput());
1159 vtkDataArray* regionIds = labeled->GetPointData()->GetArray(RegionIdArrayName);
1160 vtkDataArray* globalNodeIds = labeled->GetPointData()->GetArray(this->GlobalNodeIdArrayName);
1161 const vtkIdType numberOfPoints = labeled->GetNumberOfPoints();
1162
1163 // The path of each point is the length of the polyline through the points
1164 // of its region, in the order of their ids, up to the point
1165 vtkNew<vtkDoubleArray> path;
1166 path->SetName(this->PathArrayName);
1167 path->SetNumberOfValues(numberOfPoints);
1168 path->Fill(-1.0);
1169
1170 std::vector<std::vector<std::pair<double,vtkIdType>>> regionPoints(connectivity->GetNumberOfExtractedRegions());
1171 for (vtkIdType i=0; i<numberOfPoints; i++)
1172 {
1173 regionPoints[static_cast<size_t>(regionIds->GetTuple1(i))].push_back({globalNodeIds->GetTuple1(i), i});
1174 }
1175 double point[3], previousPoint[3];
1176 for (std::vector<std::pair<double,vtkIdType>>& points : regionPoints)
1177 {
1178 std::sort(points.begin(),points.end());
1179 double distance = 0.0;
1180 for (size_t k=0; k<points.size(); k++)
1181 {
1182 labeled->GetPoint(points[k].second,point);
1183 if (k > 0)
1184 {
1185 distance += sqrt(vtkMath::Distance2BetweenPoints(point,previousPoint));
1186 }
1187 path->SetValue(points[k].second,distance);
1188 previousPoint[0] = point[0];
1189 previousPoint[1] = point[1];
1190 previousPoint[2] = point[2];
1191 }
1192 }
1193 labeled->GetPointData()->AddArray(path);
1194
1195 RenameRegionIds(labeled->GetPointData(),labelArrayName);
1196 RenameRegionIds(labeled->GetCellData(),labelArrayName);
1197
1198 vtkNew<vtkIdTypeArray> otherPointIds;
1199 otherPointIds->SetName(otherArrayName);
1200 otherPointIds->SetNumberOfValues(numberOfPoints);
1201 otherPointIds->Fill(-1);
1202 labeled->GetPointData()->AddArray(otherPointIds);
1203 vtkNew<vtkIdTypeArray> otherCellIds;
1204 otherCellIds->SetName(otherArrayName);
1205 otherCellIds->SetNumberOfValues(labeled->GetNumberOfCells());
1206 otherCellIds->Fill(-1);
1207 labeled->GetCellData()->AddArray(otherCellIds);
1208
1209 lines->DeepCopy(labeled);
1210}

Member Data Documentation

◆ Surface

vtkPolyData* vtkvmtkPolyDataCenterlineBranchSplitting::Surface
protected

Definition at line 255 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ RadiusArrayName

char* vtkvmtkPolyDataCenterlineBranchSplitting::RadiusArrayName
protected

Definition at line 257 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ BranchIdArrayName

char* vtkvmtkPolyDataCenterlineBranchSplitting::BranchIdArrayName
protected

Definition at line 258 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ BifurcationIdArrayName

char* vtkvmtkPolyDataCenterlineBranchSplitting::BifurcationIdArrayName
protected

Definition at line 259 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ PathArrayName

char* vtkvmtkPolyDataCenterlineBranchSplitting::PathArrayName
protected

Definition at line 260 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ CenterlineIdArrayName

char* vtkvmtkPolyDataCenterlineBranchSplitting::CenterlineIdArrayName
protected

Definition at line 261 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ GlobalNodeIdArrayName

char* vtkvmtkPolyDataCenterlineBranchSplitting::GlobalNodeIdArrayName
protected

Definition at line 262 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ CenterlineSectionNormalArrayName

char* vtkvmtkPolyDataCenterlineBranchSplitting::CenterlineSectionNormalArrayName
protected

Definition at line 263 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ CenterlineSectionBifurcationArrayName

char* vtkvmtkPolyDataCenterlineBranchSplitting::CenterlineSectionBifurcationArrayName
protected

Definition at line 264 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.

◆ NumberOfCenterlines

int vtkvmtkPolyDataCenterlineBranchSplitting::NumberOfCenterlines
protected

Definition at line 266 of file vtkvmtkPolyDataCenterlineBranchSplitting.h.


The documentation for this class was generated from the following files: