Create an empty, polydata, polydata manifold, polydata manifold extended, or unstructured grid neighborhood from a matching vtk object.
More...
#include <vtkvmtkNeighborhoods.h>
Create an empty, polydata, polydata manifold, polydata manifold extended, or unstructured grid neighborhood from a matching vtk object.
vtkvmtkNeighborhoods is the concrete vtkvmtkDataSetItems collection that builds one vtkvmtkNeighborhood per point of an input DataSet (set via the inherited SetDataSet). The SetNeighborhoodTypeTo* convenience methods select which concrete vtkvmtkNeighborhood subclass (vtkvmtkEmptyNeighborhood, vtkvmtkPolyDataNeighborhood, vtkvmtkPolyDataManifoldNeighborhood, vtkvmtkPolyDataManifoldExtendedNeighborhood, or vtkvmtkUnstructuredGridNeighborhood) is instantiated for each point; Build() (inherited from vtkvmtkDataSetItems) then computes every point's neighborhood. This is the standard way vmtk filters (e.g. non-manifold edge detection, centerline resampling) obtain, for every point of a surface or volume mesh, the ids of its topological neighbors.
- See also
- vtkvmtkDataSetItems, vtkvmtkNeighborhood
Definition at line 47 of file vtkvmtkNeighborhoods.h.
◆ Superclass
◆ vtkvmtkNeighborhoods()
| vtkvmtkNeighborhoods::vtkvmtkNeighborhoods |
( |
| ) |
|
|
inlineprotected |
◆ ~vtkvmtkNeighborhoods()
| vtkvmtkNeighborhoods::~vtkvmtkNeighborhoods |
( |
| ) |
|
|
inlineprotected |
◆ New()
◆ IsTypeOf()
| int vtkvmtkNeighborhoods::IsTypeOf |
( |
const char * | type | ) |
|
|
static |
◆ IsA()
| virtual int vtkvmtkNeighborhoods::IsA |
( |
const char * | type | ) |
|
|
virtual |
◆ SafeDownCast()
◆ NewInstanceInternal()
| virtual vtkObjectBase * vtkvmtkNeighborhoods::NewInstanceInternal |
( |
| ) |
const |
|
protectedvirtual |
◆ NewInstance()
◆ SetNieghborhoodTypeToEmptyNeighborhood()
| void vtkvmtkNeighborhoods::SetNieghborhoodTypeToEmptyNeighborhood |
( |
| ) |
|
|
inline |
Select which concrete vtkvmtkNeighborhood subclass Build()/AllocateNeighborhood() instantiate for each point: an empty (no-op) neighborhood, a generic poly data neighborhood, a poly data neighborhood restricted to a 2-manifold surface, an extended (larger-ring) manifold neighborhood, or an unstructured grid neighborhood. Equivalent to calling SetItemType() with the matching VTK_VMTK_*_NEIGHBORHOOD constant.
Definition at line 62 of file vtkvmtkNeighborhoods.h.
virtual void SetItemType(int)
@ VTK_VMTK_EMPTY_NEIGHBORHOOD
◆ SetNeighborhoodTypeToPolyDataNeighborhood()
| void vtkvmtkNeighborhoods::SetNeighborhoodTypeToPolyDataNeighborhood |
( |
| ) |
|
|
inline |
Select which concrete vtkvmtkNeighborhood subclass Build()/AllocateNeighborhood() instantiate for each point: an empty (no-op) neighborhood, a generic poly data neighborhood, a poly data neighborhood restricted to a 2-manifold surface, an extended (larger-ring) manifold neighborhood, or an unstructured grid neighborhood. Equivalent to calling SetItemType() with the matching VTK_VMTK_*_NEIGHBORHOOD constant.
Definition at line 64 of file vtkvmtkNeighborhoods.h.
@ VTK_VMTK_POLYDATA_NEIGHBORHOOD
◆ SetNeighborhoodTypeToPolyDataManifoldNeighborhood()
| void vtkvmtkNeighborhoods::SetNeighborhoodTypeToPolyDataManifoldNeighborhood |
( |
| ) |
|
|
inline |
Select which concrete vtkvmtkNeighborhood subclass Build()/AllocateNeighborhood() instantiate for each point: an empty (no-op) neighborhood, a generic poly data neighborhood, a poly data neighborhood restricted to a 2-manifold surface, an extended (larger-ring) manifold neighborhood, or an unstructured grid neighborhood. Equivalent to calling SetItemType() with the matching VTK_VMTK_*_NEIGHBORHOOD constant.
Definition at line 66 of file vtkvmtkNeighborhoods.h.
@ VTK_VMTK_POLYDATA_MANIFOLD_NEIGHBORHOOD
◆ SetNeighborhoodTypeToPolyDataManifoldExtendedNeighborhood()
| void vtkvmtkNeighborhoods::SetNeighborhoodTypeToPolyDataManifoldExtendedNeighborhood |
( |
| ) |
|
|
inline |
Select which concrete vtkvmtkNeighborhood subclass Build()/AllocateNeighborhood() instantiate for each point: an empty (no-op) neighborhood, a generic poly data neighborhood, a poly data neighborhood restricted to a 2-manifold surface, an extended (larger-ring) manifold neighborhood, or an unstructured grid neighborhood. Equivalent to calling SetItemType() with the matching VTK_VMTK_*_NEIGHBORHOOD constant.
Definition at line 68 of file vtkvmtkNeighborhoods.h.
@ VTK_VMTK_POLYDATA_MANIFOLD_EXTENDED_NEIGHBORHOOD
◆ SetNeighborhoodTypeToUnstructuredGridNeighborhood()
| void vtkvmtkNeighborhoods::SetNeighborhoodTypeToUnstructuredGridNeighborhood |
( |
| ) |
|
|
inline |
Select which concrete vtkvmtkNeighborhood subclass Build()/AllocateNeighborhood() instantiate for each point: an empty (no-op) neighborhood, a generic poly data neighborhood, a poly data neighborhood restricted to a 2-manifold surface, an extended (larger-ring) manifold neighborhood, or an unstructured grid neighborhood. Equivalent to calling SetItemType() with the matching VTK_VMTK_*_NEIGHBORHOOD constant.
Definition at line 70 of file vtkvmtkNeighborhoods.h.
@ VTK_VMTK_UNSTRUCTUREDGRID_NEIGHBORHOOD
◆ GetNeighborhood()
Get the neighborhood item built for the point with the given id. Valid only after Build() has been called.
Definition at line 78 of file vtkvmtkNeighborhoods.h.
78{
return (vtkvmtkNeighborhood*)this->
Array[ptId];};
◆ SetNumberOfNeighborhoods()
| void vtkvmtkNeighborhoods::SetNumberOfNeighborhoods |
( |
vtkIdType | numberOfNeighborhoods | ) |
|
|
inline |
Set/get the number of neighborhoods (i.e. points) in the collection.
Definition at line 84 of file vtkvmtkNeighborhoods.h.
void SetNumberOfItems(vtkIdType numberOfItems)
◆ GetNumberOfNeighborhoods()
| vtkIdType vtkvmtkNeighborhoods::GetNumberOfNeighborhoods |
( |
| ) |
|
|
inline |
Set/get the number of neighborhoods (i.e. points) in the collection.
Definition at line 85 of file vtkvmtkNeighborhoods.h.
vtkIdType GetNumberOfItems()
◆ AllocateNeighborhood()
| void vtkvmtkNeighborhoods::AllocateNeighborhood |
( |
vtkIdType | i, |
|
|
vtkIdType | neighborhoodType ) |
|
inline |
Replace the neighborhood at index i with a newly instantiated neighborhood of the given neighborhoodType (one of the VTK_VMTK_*_NEIGHBORHOOD constants), overriding the collection-wide type set via the SetNeighborhoodTypeTo* methods for that single point.
Definition at line 93 of file vtkvmtkNeighborhoods.h.
void AllocateItem(vtkIdType i, vtkIdType itemType)
◆ InstantiateNewItem()
| vtkvmtkItem * vtkvmtkNeighborhoods::InstantiateNewItem |
( |
int | itemType | ) |
|
|
overrideprotectedvirtual |
Implements vtkvmtkItems.
Definition at line 36 of file vtkvmtkNeighborhoods.cxx.
37 {
38 vtkvmtkNeighborhood* newItem;
39
40 switch(itemType)
41 {
44 break;
47 break;
50 break;
53 break;
56 break;
57 default:
58 vtkErrorMacro(<<"Invalid neighborhood type");
59 return NULL;
60 }
61
63
64 newItem->Register(this);
65 newItem->Delete();
66
67 return newItem;
68 }
virtual void SetReallocateOnBuild(int)
static vtkvmtkEmptyNeighborhood * New()
static vtkvmtkPolyDataManifoldExtendedNeighborhood * New()
static vtkvmtkPolyDataManifoldNeighborhood * New()
static vtkvmtkPolyDataNeighborhood * New()
static vtkvmtkUnstructuredGridNeighborhood * New()
The documentation for this class was generated from the following files: