|
VMTK
|
Close holes in a surface by creating a cap made of triangles sharing a common vertex at the boundary barycenter. More...
#include <vtkvmtkCapPolyData.h>
Public Types | |
| typedef vtkPolyDataAlgorithm | Superclass |
Public Member Functions | |
| virtual int | IsA (const char *type) |
| vtkvmtkCapPolyData * | NewInstance () const |
| void | PrintSelf (std::ostream &os, vtkIndent indent) override |
| virtual vtkIdList * | GetCapCenterIds () |
| virtual void | SetBoundaryIds (vtkIdList *) |
| virtual vtkIdList * | GetBoundaryIds () |
| virtual void | SetCellEntityIdsArrayName (const char *) |
| virtual char * | GetCellEntityIdsArrayName () |
| virtual void | SetCellEntityIdOffset (int) |
| virtual int | GetCellEntityIdOffset () |
| virtual void | SetBoundaryLabelsArrayName (const char *) |
| virtual char * | GetBoundaryLabelsArrayName () |
| virtual void | SetBoundaryPointOrderArrayName (const char *) |
| virtual char * | GetBoundaryPointOrderArrayName () |
| virtual void | SetBoundaryCellEntityIds (vtkIdTypeArray *) |
| virtual vtkIdTypeArray * | GetBoundaryCellEntityIds () |
| virtual void | SetDisplacement (double) |
| virtual double | GetDisplacement () |
| virtual void | SetInPlaneDisplacement (double) |
| virtual double | GetInPlaneDisplacement () |
Static Public Member Functions | |
| static int | IsTypeOf (const char *type) |
| static vtkvmtkCapPolyData * | SafeDownCast (vtkObjectBase *o) |
| static vtkvmtkCapPolyData * | New () |
Protected Member Functions | |
| virtual vtkObjectBase * | NewInstanceInternal () const |
| vtkvmtkCapPolyData () | |
| ~vtkvmtkCapPolyData () | |
| virtual int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override |
Protected Attributes | |
| vtkIdList * | BoundaryIds |
| char * | CellEntityIdsArrayName |
| int | CellEntityIdOffset |
| char * | BoundaryLabelsArrayName |
| char * | BoundaryPointOrderArrayName |
| vtkIdTypeArray * | BoundaryCellEntityIds |
| double | Displacement |
| double | InPlaneDisplacement |
| vtkIdList * | CapCenterIds |
Close holes in a surface by creating a cap made of triangles sharing a common vertex at the boundary barycenter.
This class closes the boundaries of a surface with a cap. Each cap is made of triangles sharing the boundary barycenter which is added to the data set. It is possible to retrieve the ids of the added points with GetCapCenterIds. Boundary barycenters can be displaced along boundary normals through the Displacement parameter. Since this class is used as a preprocessing step for Delaunay tessellation, displacement is meant to avoid the occurrences of degenerate tetrahedra on the caps.
This is the simplest of the capping strategies used by the vmtksurfacecapper pype script (its "simple" Method); it is a fast, one-triangle-fan-per-hole capper meant to produce a closed, tetrahedralizable surface (e.g. before Delaunay-based volume meshing or before centerline extraction, both of which require a closed surface). Each open boundary of the input is capped independently; boundaries can be restricted with BoundaryIds. If CellEntityIdsArrayName is set, the newly created cap triangles are tagged with per-boundary ids in that cell data array, which downstream tools (mesh generators, boundary condition assignment) use to distinguish inlets/outlets/wall.
Definition at line 51 of file vtkvmtkCapPolyData.h.
| typedef vtkPolyDataAlgorithm vtkvmtkCapPolyData::Superclass |
Definition at line 54 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 44 of file vtkvmtkCapPolyData.cxx.
|
protected |
Definition at line 57 of file vtkvmtkCapPolyData.cxx.
|
static |
|
virtual |
|
static |
|
protectedvirtual |
| vtkvmtkCapPolyData * vtkvmtkCapPolyData::NewInstance | ( | ) | const |
|
override |
Definition at line 317 of file vtkvmtkCapPolyData.cxx.
|
static |
|
virtual |
Set/Get the ids of the boundaries to cap. If not set (default, NULL), every open boundary of the input surface is capped. A boundary's id is its label when BoundaryLabelsArrayName and BoundaryPointOrderArrayName are set and the input carries those arrays, and otherwise its position in the list of open boundaries extracted from the input, in the order returned by vtkvmtkPolyDataBoundaryExtractor.
|
virtual |
Set/Get the ids of the boundaries to cap. If not set (default, NULL), every open boundary of the input surface is capped. A boundary's id is its label when BoundaryLabelsArrayName and BoundaryPointOrderArrayName are set and the input carries those arrays, and otherwise its position in the list of open boundaries extracted from the input, in the order returned by vtkvmtkPolyDataBoundaryExtractor.
|
virtual |
Set/Get the name of the cell data array used to tag the newly created cap triangles with an integer id, one distinct value per capped boundary (offset by CellEntityIdOffset, then further offset by boundary index + 1). If the array already exists on the input, existing cell values are preserved and only the new cap cells are appended with the new tag. If left NULL (default), no cell entity id array is created. Commonly named "CellEntityIds".
|
virtual |
Set/Get the name of the cell data array used to tag the newly created cap triangles with an integer id, one distinct value per capped boundary (offset by CellEntityIdOffset, then further offset by boundary index + 1). If the array already exists on the input, existing cell values are preserved and only the new cap cells are appended with the new tag. If left NULL (default), no cell entity id array is created. Commonly named "CellEntityIds".
|
virtual |
Set/Get the base offset added to the ids written into CellEntityIdsArrayName. The id assigned to the cap of the i-th processed boundary is (i + 1 + CellEntityIdOffset). Default: 1.
|
virtual |
Set/Get the base offset added to the ids written into CellEntityIdsArrayName. The id assigned to the cap of the i-th processed boundary is (i + 1 + CellEntityIdOffset). Default: 1.
|
virtual |
Set/Get the names of the point data arrays that carry the boundary labels of the input, as written by vtkvmtkPolyDataBoundaryLabeler. When both are set and the input carries arrays that still describe it, the boundaries are read from them instead of being extracted, and the cap of each boundary can be named through BoundaryCellEntityIds. The arrays are written on the output too, where the points of a capped boundary keep the label they had, as a record of the boundary the cap closed.
Setting them also settles what a boundary id means everywhere else in this filter: with the labels in use a boundary's id is its label, and without them it is the boundary's position in the order the extractor returns, which is what it has always been. So BoundaryIds and BoundaryCellEntityIds are read the same way either way, and a caller that labels its surface gets ids that survive the filters in between without having to say so twice.
A label is not merely a name this filter then has to turn into an id: it is the id. The labeler numbers the boundaries of a surface from CellEntityIdOffset+1 up, which is where this filter would have numbered their caps anyway, so the cap of a labeled boundary carries its label unchanged and a labeled surface is capped exactly as an unlabeled one is.
|
virtual |
Set/Get the names of the point data arrays that carry the boundary labels of the input, as written by vtkvmtkPolyDataBoundaryLabeler. When both are set and the input carries arrays that still describe it, the boundaries are read from them instead of being extracted, and the cap of each boundary can be named through BoundaryCellEntityIds. The arrays are written on the output too, where the points of a capped boundary keep the label they had, as a record of the boundary the cap closed.
Setting them also settles what a boundary id means everywhere else in this filter: with the labels in use a boundary's id is its label, and without them it is the boundary's position in the order the extractor returns, which is what it has always been. So BoundaryIds and BoundaryCellEntityIds are read the same way either way, and a caller that labels its surface gets ids that survive the filters in between without having to say so twice.
A label is not merely a name this filter then has to turn into an id: it is the id. The labeler numbers the boundaries of a surface from CellEntityIdOffset+1 up, which is where this filter would have numbered their caps anyway, so the cap of a labeled boundary carries its label unchanged and a labeled surface is capped exactly as an unlabeled one is.
|
virtual |
Set/Get the names of the point data arrays that carry the boundary labels of the input, as written by vtkvmtkPolyDataBoundaryLabeler. When both are set and the input carries arrays that still describe it, the boundaries are read from them instead of being extracted, and the cap of each boundary can be named through BoundaryCellEntityIds. The arrays are written on the output too, where the points of a capped boundary keep the label they had, as a record of the boundary the cap closed.
Setting them also settles what a boundary id means everywhere else in this filter: with the labels in use a boundary's id is its label, and without them it is the boundary's position in the order the extractor returns, which is what it has always been. So BoundaryIds and BoundaryCellEntityIds are read the same way either way, and a caller that labels its surface gets ids that survive the filters in between without having to say so twice.
A label is not merely a name this filter then has to turn into an id: it is the id. The labeler numbers the boundaries of a surface from CellEntityIdOffset+1 up, which is where this filter would have numbered their caps anyway, so the cap of a labeled boundary carries its label unchanged and a labeled surface is capped exactly as an unlabeled one is.
|
virtual |
Set/Get the names of the point data arrays that carry the boundary labels of the input, as written by vtkvmtkPolyDataBoundaryLabeler. When both are set and the input carries arrays that still describe it, the boundaries are read from them instead of being extracted, and the cap of each boundary can be named through BoundaryCellEntityIds. The arrays are written on the output too, where the points of a capped boundary keep the label they had, as a record of the boundary the cap closed.
Setting them also settles what a boundary id means everywhere else in this filter: with the labels in use a boundary's id is its label, and without them it is the boundary's position in the order the extractor returns, which is what it has always been. So BoundaryIds and BoundaryCellEntityIds are read the same way either way, and a caller that labels its surface gets ids that survive the filters in between without having to say so twice.
A label is not merely a name this filter then has to turn into an id: it is the id. The labeler numbers the boundaries of a surface from CellEntityIdOffset+1 up, which is where this filter would have numbered their caps anyway, so the cap of a labeled boundary carries its label unchanged and a labeled surface is capped exactly as an unlabeled one is.
|
virtual |
Set/Get the id to write into CellEntityIdsArrayName for the cap of each boundary, indexed the way boundary ids are indexed everywhere else here (see BoundaryIds): entry i is the id given to the cap closing the boundary whose id is i.
An id beyond the end of the array, or one whose entry is negative, is no entry at all: with the labels in use that cap keeps its boundary's label, which already is the id its position would have given it, and without them the id its position gives it. An output can carry ids from both rules at once. An id chosen here is used as it stands, with CellEntityIdOffset not added to it, while the offset still lands on the cells copied from the input and on any boundary left to its positional id. A label is not shifted either, for the same reason: it was numbered above the wall to begin with, and shifting it again would move the cap off the id its end is known by.
Where this earns its keep is with the boundary labels in use, because then the choice survives the filters in between: the label of a vessel end is carried by the surface's own point data, so a flow extension that replaces a boundary with a new one at the tip of its extension, or any filter that renumbers the points, leaves the answer to "which end is this" unchanged.
|
virtual |
Set/Get the id to write into CellEntityIdsArrayName for the cap of each boundary, indexed the way boundary ids are indexed everywhere else here (see BoundaryIds): entry i is the id given to the cap closing the boundary whose id is i.
An id beyond the end of the array, or one whose entry is negative, is no entry at all: with the labels in use that cap keeps its boundary's label, which already is the id its position would have given it, and without them the id its position gives it. An output can carry ids from both rules at once. An id chosen here is used as it stands, with CellEntityIdOffset not added to it, while the offset still lands on the cells copied from the input and on any boundary left to its positional id. A label is not shifted either, for the same reason: it was numbered above the wall to begin with, and shifting it again would move the cap off the id its end is known by.
Where this earns its keep is with the boundary labels in use, because then the choice survives the filters in between: the label of a vessel end is carried by the surface's own point data, so a flow extension that replaces a boundary with a new one at the tip of its extension, or any filter that renumbers the points, leaves the answer to "which end is this" unchanged.
|
virtual |
Set/Get the displacement of boundary barycenters along the (outward-oriented) boundary normal, expressed as a fraction of the boundary's mean radius. A small positive value (default 0.1) lifts the cap center off the boundary plane so that Delaunay tetrahedralization of the capped surface does not produce degenerate (near-zero-volume) tetrahedra.
|
virtual |
Set/Get the displacement of boundary barycenters along the (outward-oriented) boundary normal, expressed as a fraction of the boundary's mean radius. A small positive value (default 0.1) lifts the cap center off the boundary plane so that Delaunay tetrahedralization of the capped surface does not produce degenerate (near-zero-volume) tetrahedra.
|
virtual |
Set/Get the in-plane displacement of boundary barycenters, expressed as a fraction of the boundary's mean radius, applied along one of the two directions perpendicular to the boundary normal. Like Displacement, this is used to break symmetry and avoid degenerate tetrahedra in a subsequent Delaunay tessellation. Default: 0.1.
|
virtual |
Set/Get the in-plane displacement of boundary barycenters, expressed as a fraction of the boundary's mean radius, applied along one of the two directions perpendicular to the boundary normal. Like Displacement, this is used to break symmetry and avoid degenerate tetrahedra in a subsequent Delaunay tessellation. Default: 0.1.
|
virtual |
Get the ids, in the output poly data, of the newly inserted cap-center (barycenter) points – one per processed boundary, in the same order as the boundaries returned by vtkvmtkPolyDataBoundaryExtractor, and indexed consistently with BoundaryIds when the latter is set. Valid only after Update() has been called.
|
overrideprotectedvirtual |
Definition at line 83 of file vtkvmtkCapPolyData.cxx.
|
protected |
Definition at line 163 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 164 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 165 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 166 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 167 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 168 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 170 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 171 of file vtkvmtkCapPolyData.h.
|
protected |
Definition at line 172 of file vtkvmtkCapPolyData.h.