VMTK
Loading...
Searching...
No Matches
vtkvmtkDataSetItem Class Referenceabstract

Create an item instance associated with a data set and a particular point id. More...

#include <vtkvmtkDataSetItem.h>

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

Public Types

typedef vtkvmtkItem Superclass
Public Types inherited from vtkvmtkItem
typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkDataSetItem * NewInstance () const
virtual void Build ()=0
virtual void DeepCopy (vtkvmtkItem *src) override
void SetDataSet (vtkDataSet *dataSet)
vtkDataSet * GetDataSet ()
virtual void SetDataSetPointId (vtkIdType)
virtual vtkIdType GetDataSetPointId ()
virtual void SetReallocateOnBuild (int)
virtual int GetReallocateOnBuild ()
virtual void ReallocateOnBuildOn ()
virtual void ReallocateOnBuildOff ()
Public Member Functions inherited from vtkvmtkItem
vtkvmtkItem * NewInstance () const
virtual vtkIdType GetItemType ()=0

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkvmtkDataSetItem * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkItem
static int IsTypeOf (const char *type)
static vtkvmtkItem * SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkDataSetItem ()
 ~vtkvmtkDataSetItem ()
Protected Member Functions inherited from vtkvmtkItem
 vtkvmtkItem ()
 ~vtkvmtkItem ()

Protected Attributes

vtkDataSet * DataSet
vtkIdType DataSetPointId
int ReallocateOnBuild

Detailed Description

Create an item instance associated with a data set and a particular point id.

vtkvmtkDataSetItem is an abstract vtkvmtkItem specialization that anchors the item to a specific point (DataSetPointId) of a specific vtkDataSet (DataSet). Concrete subclasses (e.g. vtkvmtkNeighborhood and its descendants) use Build() to compute, from DataSet and DataSetPointId, whatever local geometric quantity the item represents (topological neighbors, finite-difference stencil weights, etc.). Items of this kind are normally created and owned in bulk by a matching vtkvmtkDataSetItems collection, one per point of the data set.

See also
vtkvmtkDataSetItems, vtkvmtkNeighborhood, vtkvmtkItem

Definition at line 42 of file vtkvmtkDataSetItem.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkvmtkDataSetItem()

vtkvmtkDataSetItem::vtkvmtkDataSetItem ( )
protected

Definition at line 27 of file vtkvmtkDataSetItem.cxx.

28 {
29 this->DataSetPointId = -1;
30 this->DataSet = NULL;
31 this->ReallocateOnBuild = 0;
32 }

◆ ~vtkvmtkDataSetItem()

vtkvmtkDataSetItem::~vtkvmtkDataSetItem ( )
inlineprotected

Definition at line 91 of file vtkvmtkDataSetItem.h.

91{};

Member Function Documentation

◆ IsTypeOf()

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

◆ IsA()

◆ SafeDownCast()

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

◆ NewInstanceInternal()

◆ NewInstance()

vtkvmtkDataSetItem * vtkvmtkDataSetItem::NewInstance ( ) const

◆ SetDataSet()

void vtkvmtkDataSetItem::SetDataSet ( vtkDataSet * dataSet)
inline

Set/get the data set that this item refers to. The reference is stored but not registered (no reference counting), so the data set must be kept alive by the caller for the lifetime of this item.

Definition at line 56 of file vtkvmtkDataSetItem.h.

56{this->DataSet = dataSet;};

◆ GetDataSet()

vtkDataSet * vtkvmtkDataSetItem::GetDataSet ( )
inline

Set/get the data set that this item refers to. The reference is stored but not registered (no reference counting), so the data set must be kept alive by the caller for the lifetime of this item.

Definition at line 57 of file vtkvmtkDataSetItem.h.

57{return this->DataSet;};

◆ SetDataSetPointId()

virtual void vtkvmtkDataSetItem::SetDataSetPointId ( vtkIdType )
virtual

Set/get the id, within DataSet, of the point that this item is built around. Default: -1 (unset).

◆ GetDataSetPointId()

virtual vtkIdType vtkvmtkDataSetItem::GetDataSetPointId ( )
virtual

Set/get the id, within DataSet, of the point that this item is built around. Default: -1 (unset).

◆ Build()

◆ DeepCopy()

void vtkvmtkDataSetItem::DeepCopy ( vtkvmtkItem * src)
overridevirtual

Standard DeepCopy method.

Reimplemented from vtkvmtkItem.

Reimplemented in vtkvmtkNeighborhood, and vtkvmtkStencil.

Definition at line 34 of file vtkvmtkDataSetItem.cxx.

35 {
36 this->Superclass::DeepCopy(src);
37
39
40 if (dataSetItemSrc==NULL)
41 {
42 vtkErrorMacro(<<"Trying to deep copy a non-stencil item");
43 }
44
45 this->SetDataSet(dataSetItemSrc->GetDataSet());
46 this->DataSetPointId = dataSetItemSrc->DataSetPointId;
47
48 }
vtkDataSet * GetDataSet()
static vtkvmtkDataSetItem * SafeDownCast(vtkObjectBase *o)
void SetDataSet(vtkDataSet *dataSet)
virtual void DeepCopy(vtkvmtkItem *src)

◆ SetReallocateOnBuild()

virtual void vtkvmtkDataSetItem::SetReallocateOnBuild ( int )
virtual

Toggle whether Build() is forced to reallocate/recompute the item's internal data even if it has already been built. Default: off.

◆ GetReallocateOnBuild()

virtual int vtkvmtkDataSetItem::GetReallocateOnBuild ( )
virtual

Toggle whether Build() is forced to reallocate/recompute the item's internal data even if it has already been built. Default: off.

◆ ReallocateOnBuildOn()

virtual void vtkvmtkDataSetItem::ReallocateOnBuildOn ( )
virtual

Toggle whether Build() is forced to reallocate/recompute the item's internal data even if it has already been built. Default: off.

◆ ReallocateOnBuildOff()

virtual void vtkvmtkDataSetItem::ReallocateOnBuildOff ( )
virtual

Toggle whether Build() is forced to reallocate/recompute the item's internal data even if it has already been built. Default: off.

Member Data Documentation

◆ DataSet

vtkDataSet* vtkvmtkDataSetItem::DataSet
protected

Definition at line 93 of file vtkvmtkDataSetItem.h.

◆ DataSetPointId

vtkIdType vtkvmtkDataSetItem::DataSetPointId
protected

Definition at line 94 of file vtkvmtkDataSetItem.h.

◆ ReallocateOnBuild

int vtkvmtkDataSetItem::ReallocateOnBuild
protected

Definition at line 96 of file vtkvmtkDataSetItem.h.


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