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

Create a single instance wrapping a harmonic function over a cylinder so that mapping can be applied with stretching of the longitudinal metric. More...

#include <vtkvmtkPolyDataCylinderHarmonicMappingFilter.h>

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

Public Types

typedef vtkvmtkPolyDataHarmonicMappingFilter Superclass
Public Types inherited from vtkvmtkPolyDataHarmonicMappingFilter
enum  { VTK_VMTK_ASSEMBLY_STENCILS , VTK_VMTK_ASSEMBLY_FINITEELEMENTS }
typedef vtkPolyDataAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkPolyDataCylinderHarmonicMappingFilter * NewInstance () const
Public Member Functions inherited from vtkvmtkPolyDataHarmonicMappingFilter
vtkvmtkPolyDataHarmonicMappingFilter * NewInstance () const
virtual void SetBoundaryPointIds (vtkIdList *)
virtual vtkIdList * GetBoundaryPointIds ()
virtual void SetBoundaryValues (vtkDoubleArray *)
virtual vtkDoubleArray * GetBoundaryValues ()
virtual void SetHarmonicMappingArrayName (const char *)
virtual char * GetHarmonicMappingArrayName ()
virtual void SetConvergenceTolerance (double)
virtual double GetConvergenceTolerance ()
virtual void SetAssemblyMode (int)
virtual int GetAssemblyMode ()
void SetAssemblyModeToStencils ()
void SetAssemblyModeToFiniteElements ()
virtual void SetQuadratureOrder (int)
virtual int GetQuadratureOrder ()

Static Public Member Functions

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

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkPolyDataCylinderHarmonicMappingFilter ()
 ~vtkvmtkPolyDataCylinderHarmonicMappingFilter ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Protected Member Functions inherited from vtkvmtkPolyDataHarmonicMappingFilter
 vtkvmtkPolyDataHarmonicMappingFilter ()
 ~vtkvmtkPolyDataHarmonicMappingFilter ()

Additional Inherited Members

Protected Attributes inherited from vtkvmtkPolyDataHarmonicMappingFilter
vtkIdList * BoundaryPointIds
vtkDoubleArray * BoundaryValues
char * HarmonicMappingArrayName
double ConvergenceTolerance
int AssemblyMode
int QuadratureOrder

Detailed Description

Create a single instance wrapping a harmonic function over a cylinder so that mapping can be applied with stretching of the longitudinal metric.

vtkvmtkPolyDataCylinderHarmonicMappingFilter specializes vtkvmtkPolyDataHarmonicMappingFilter for an input surface that is topologically a cylinder (i.e. has exactly two open boundaries, as detected with vtkvmtkPolyDataBoundaryExtractor). It automatically builds the Dirichlet boundary conditions expected by the base class (BoundaryPointIds / BoundaryValues) by assigning value 0 to every point on the first boundary and value 1 to every point on the second, then delegates to vtkvmtkPolyDataHarmonicMappingFilter::RequestData to solve the harmonic (Laplace) problem. The result is a scalar field, stored under HarmonicMappingArrayName, that increases monotonically from one end of the cylinder to the other and can be used as a longitudinal (streamwise) surface parameterization. If the input does not have exactly two boundaries, the input is passed through unmodified and a warning is issued.

See also
vtkvmtkPolyDataHarmonicMappingFilter, vtkvmtkPolyDataBoundaryExtractor

Definition at line 42 of file vtkvmtkPolyDataCylinderHarmonicMappingFilter.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkvmtkPolyDataCylinderHarmonicMappingFilter()

vtkvmtkPolyDataCylinderHarmonicMappingFilter::vtkvmtkPolyDataCylinderHarmonicMappingFilter ( )
protected

Definition at line 35 of file vtkvmtkPolyDataCylinderHarmonicMappingFilter.cxx.

36{
37}

◆ ~vtkvmtkPolyDataCylinderHarmonicMappingFilter()

vtkvmtkPolyDataCylinderHarmonicMappingFilter::~vtkvmtkPolyDataCylinderHarmonicMappingFilter ( )
protected

Definition at line 39 of file vtkvmtkPolyDataCylinderHarmonicMappingFilter.cxx.

40{
41}

Member Function Documentation

◆ New()

vtkvmtkPolyDataCylinderHarmonicMappingFilter * vtkvmtkPolyDataCylinderHarmonicMappingFilter::New ( )
static

◆ IsTypeOf()

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

◆ IsA()

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

◆ SafeDownCast()

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

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkPolyDataCylinderHarmonicMappingFilter::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkvmtkPolyDataCylinderHarmonicMappingFilter * vtkvmtkPolyDataCylinderHarmonicMappingFilter::NewInstance ( ) const

◆ RequestData()

int vtkvmtkPolyDataCylinderHarmonicMappingFilter::RequestData ( vtkInformation * request,
vtkInformationVector ** inputVector,
vtkInformationVector * outputVector )
overrideprotectedvirtual

Reimplemented from vtkvmtkPolyDataHarmonicMappingFilter.

Definition at line 43 of file vtkvmtkPolyDataCylinderHarmonicMappingFilter.cxx.

47{
48 vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
49
50 vtkPolyData *input = vtkPolyData::SafeDownCast(
51 inInfo->Get(vtkDataObject::DATA_OBJECT()));
52
53 vtkvmtkPolyDataBoundaryExtractor* boundaryExtractor = vtkvmtkPolyDataBoundaryExtractor::New();
54 boundaryExtractor->SetInputData(input);
55 boundaryExtractor->Update();
56
57 vtkPolyData* boundaries = boundaryExtractor->GetOutput();
58
59 int numberOfBoundaries = boundaries->GetNumberOfCells();
60
61 if (numberOfBoundaries != 2)
62 {
63 vtkWarningMacro(<<"Input poly data is not topologically a cylinder.");
64 boundaryExtractor->Delete();
65 this->GetOutput()->DeepCopy(input);
66 return 1;
67 }
68
69 if (this->BoundaryPointIds)
70 {
71 this->BoundaryPointIds->Delete();
72 }
73
74 if (this->BoundaryValues)
75 {
76 this->BoundaryValues->Delete();
77 }
78
79 this->BoundaryPointIds = vtkIdList::New();
80 this->BoundaryValues = vtkDoubleArray::New();
81
82 for (int i=0; i<numberOfBoundaries; i++)
83 {
84 vtkCell* boundaryCell = boundaries->GetCell(i);
85
86 for (int j=0; j<boundaryCell->GetNumberOfPoints(); j++)
87 {
88 this->BoundaryPointIds->InsertNextId(static_cast<vtkIdType>(boundaries->GetPointData()->GetScalars()->GetTuple1(boundaryCell->GetPointId(j))));
89 this->BoundaryValues->InsertNextTuple1(static_cast<double>(i));
90 }
91 }
92
93 Superclass::RequestData(request,inputVector,outputVector);
94
95 this->BoundaryPointIds->Delete();
96 this->BoundaryPointIds = NULL;
97
98 this->BoundaryValues->Delete();
99 this->BoundaryValues = NULL;
100
101 return 1;
102}
static vtkvmtkPolyDataBoundaryExtractor * New()
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override

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