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

Create an empty, polydata, polydata manifold, polydata manifold extended, or unstructured grid neighborhood from a matching vtk object. More...

#include <vtkvmtkNeighborhoods.h>

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

Public Types

typedef vtkvmtkDataSetItems Superclass
Public Types inherited from vtkvmtkDataSetItems
typedef vtkvmtkItems Superclass
Public Types inherited from vtkvmtkItems
typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkNeighborhoods * NewInstance () const
vtkvmtkNeighborhood * GetNeighborhood (vtkIdType ptId)
void AllocateNeighborhood (vtkIdType i, vtkIdType neighborhoodType)
void SetNieghborhoodTypeToEmptyNeighborhood ()
void SetNeighborhoodTypeToPolyDataNeighborhood ()
void SetNeighborhoodTypeToPolyDataManifoldNeighborhood ()
void SetNeighborhoodTypeToPolyDataManifoldExtendedNeighborhood ()
void SetNeighborhoodTypeToUnstructuredGridNeighborhood ()
void SetNumberOfNeighborhoods (vtkIdType numberOfNeighborhoods)
vtkIdType GetNumberOfNeighborhoods ()
Public Member Functions inherited from vtkvmtkDataSetItems
vtkvmtkDataSetItems * NewInstance () const
void Build ()
void SetDataSet (vtkDataSet *dataSet)
vtkDataSet * GetDataSet ()
virtual void SetReallocateOnBuild (int)
virtual int GetReallocateOnBuild ()
virtual void ReallocateOnBuildOn ()
virtual void ReallocateOnBuildOff ()
Public Member Functions inherited from vtkvmtkItems
vtkvmtkItems * NewInstance () const
void Allocate (vtkIdType numItems, vtkIdType ext=1000)
vtkvmtkItem * GetItem (vtkIdType id)
void Squeeze ()
void Reset ()
void Initialize ()
void ReleaseArray ()
void AllocateItem (vtkIdType i, vtkIdType itemType)
void DeepCopy (vtkvmtkItems *src)
void ShallowCopy (vtkvmtkItems *src)
virtual void SetItemType (int)
virtual int GetItemType ()
void SetNumberOfItems (vtkIdType numberOfItems)
vtkIdType GetNumberOfItems ()

Static Public Member Functions

static vtkvmtkNeighborhoods * New ()
static int IsTypeOf (const char *type)
static vtkvmtkNeighborhoods * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkDataSetItems
static int IsTypeOf (const char *type)
static vtkvmtkDataSetItems * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkItems
static int IsTypeOf (const char *type)
static vtkvmtkItems * SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkNeighborhoods ()
 ~vtkvmtkNeighborhoods ()
virtual vtkvmtkItem * InstantiateNewItem (int itemType) override
Protected Member Functions inherited from vtkvmtkDataSetItems
 vtkvmtkDataSetItems ()
 ~vtkvmtkDataSetItems ()
Protected Member Functions inherited from vtkvmtkItems
 vtkvmtkItems ()
 ~vtkvmtkItems ()
vtkvmtkItem ** Resize (vtkIdType sz)

Additional Inherited Members

Protected Attributes inherited from vtkvmtkDataSetItems
vtkDataSet * DataSet
int ReallocateOnBuild
Protected Attributes inherited from vtkvmtkItems
vtkvmtkItem ** Array
vtkIdType Size
vtkIdType MaxId
vtkIdType Extend
int ItemType

Detailed Description

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.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkvmtkNeighborhoods()

vtkvmtkNeighborhoods::vtkvmtkNeighborhoods ( )
inlineprotected

Definition at line 96 of file vtkvmtkNeighborhoods.h.

96{};

◆ ~vtkvmtkNeighborhoods()

vtkvmtkNeighborhoods::~vtkvmtkNeighborhoods ( )
inlineprotected

Definition at line 97 of file vtkvmtkNeighborhoods.h.

97{};

Member Function Documentation

◆ New()

vtkvmtkNeighborhoods * vtkvmtkNeighborhoods::New ( )
static

◆ IsTypeOf()

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

◆ IsA()

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

Reimplemented from vtkvmtkDataSetItems.

◆ SafeDownCast()

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

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkNeighborhoods::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkvmtkDataSetItems.

◆ NewInstance()

vtkvmtkNeighborhoods * vtkvmtkNeighborhoods::NewInstance ( ) const

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ GetNeighborhood()

vtkvmtkNeighborhood * vtkvmtkNeighborhoods::GetNeighborhood ( vtkIdType ptId)
inline

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];};
vtkvmtkItem ** Array

◆ 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.

84{ this->SetNumberOfItems(numberOfNeighborhoods);};
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.

85{return this->GetNumberOfItems();};
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.

93{this->AllocateItem(i,neighborhoodType);};
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: