OpenVDB: PcaTransfer< PointDataTreeT > Struct Template Reference

OpenVDB 12.1.0

Loading...
Searching...
No Matches
PcaTransfer< PointDataTreeT > Struct Template Reference

`#include <openvdb/points/impl/PrincipalComponentAnalysisImpl.h>`

Inheritance diagram for PcaTransfer< PointDataTreeT >:

## Public Types
using | BaseT = VolumeTransfer<PointDataTreeT>
using | LeafNodeType = typename PointDataTreeT::LeafNodeType
using | PositionHandleT = points::AttributeHandle<Vec3d, NullCodec>
using | TreeTupleT
using | TreeType
using | ValueType
using | NodeMaskT

## Public Member Functions
| PcaTransfer (const AttrIndices &indices, const PcaSettings &settings, const Real vs, tree::LeafManager< PointDataTreeT > &manager, util::NullInterrupter *interrupt)
| PcaTransfer (const PcaTransfer &other)
float | searchRadius () const
size_t | neighbourThreshold () const
size_t | maxSourcePointsPerVoxel () const
size_t | maxTargetPointsPerVoxel () const
Vec3i | range (const Coord &, size_t) const
Vec3i | range () const
LeafNodeType * | initialize (const Coord &origin, const size_t idx, const CoordBBox &bounds)
bool | startPointLeaf (const typename PointDataTreeT::LeafNodeType &leaf)
bool | endPointLeaf (const typename PointDataTreeT::LeafNodeType &)
TreeType< 0 > & | topology ()
ValueType< Idx > * | buffer ()
const ValueType< Idx > * | buffer () const
NodeMaskT * | mask ()
NodeMaskT * | mask (const size_t idx)
const NodeMaskT * | mask () const
const NodeMaskT * | mask (const size_t idx) const
void | foreach (const FunctorT &functor)
bool | interrupted () const

## Static Public Attributes
static const size_t | Size

## Protected Attributes
const AttrIndices & | mIndices
const PcaSettings & | mSettings
const Real | mDxInv
const tree::LeafManager< PointDataTreeT > & | mManager
std::unique_ptr< PositionHandleT > | mTargetPosition
std::unique_ptr< PositionHandleT > | mSourcePosition

## Detailed Description

template<typename PointDataTreeT>
struct openvdb::v12_1::points::pca_internal::PcaTransfer< PointDataTreeT >

Note
  The PCA transfer modules are broken into two separate steps, the first which computes the weighted neighbourhoods of points and the second which computes the covariance matrices. Both these steps perform an identical loop over each points neighbourhood, with the second being necessary to re-compute the exact positions and per position weights. In theory, only a single loop is required; each point could instead create and append a large list of the exact neighbourhood positions and weights that impact it and use these to compute the covariance after the first neighbourhood loop has completed (a true gather style approach).

The double loop technique was chosen to better handle the computation of anisotropy for all points and all neighbourhoods (i.e. no limiting via the max point per voxel (MPPV) options). It makes the PCA method extremely memory efficient for all MPPV and radius values. However it might be worth falling back to a gather stlye approach when the MPPV and radius values are relatively small. We should investigate this in the future.

## Member Typedef Documentation

## ◆ BaseT

template<typename PointDataTreeT>

using BaseT = VolumeTransfer<PointDataTreeT>

## ◆ LeafNodeType

template<typename PointDataTreeT>

using LeafNodeType = typename PointDataTreeT::LeafNodeType

## ◆ NodeMaskT

using NodeMaskT
| inherited

## ◆ PositionHandleT

template<typename PointDataTreeT>

using PositionHandleT = points::AttributeHandle<Vec3d, NullCodec>

## ◆ TreeTupleT

using TreeTupleT
| inherited

## ◆ TreeType

using TreeType
| inherited

## ◆ ValueType

using ValueType
| inherited

## Constructor & Destructor Documentation

## ◆ PcaTransfer() [1/2]

template<typename PointDataTreeT>

PcaTransfer | ( | const AttrIndices & | indices,
|  | const PcaSettings & | settings,
|  | const Real | vs,
|  | tree::LeafManager< PointDataTreeT > & | manager,
|  | util::NullInterrupter * | interrupt )
| inline

## ◆ PcaTransfer() [2/2]

template<typename PointDataTreeT>

PcaTransfer | ( | const PcaTransfer< PointDataTreeT > & | other | ) |
| inline

## Member Function Documentation

## ◆ buffer() [1/2]

ValueType< Idx > * buffer | ( |  | ) |
| inlineinherited

## ◆ buffer() [2/2]

const ValueType< Idx > * buffer | ( |  | ) | const
| inlineinherited

## ◆ endPointLeaf()

template<typename PointDataTreeT>

bool endPointLeaf | ( | const typename PointDataTreeT::LeafNodeType & |  | ) |
| inline

## ◆ foreach()

void foreach | ( | const FunctorT & | functor | ) |
| inlineinherited

## ◆ initialize()

template<typename PointDataTreeT>

LeafNodeType * initialize | ( | const Coord & | origin,
|  | const size_t | idx,
|  | const CoordBBox & | bounds )
| inline

## ◆ interrupted()

bool interrupted | ( |  | ) | const
| inlineinherited

## ◆ mask() [1/4]

NodeMaskT * mask | ( |  | ) |
| inlineinherited

## ◆ mask() [2/4]

const NodeMaskT * mask | ( |  | ) | const
| inlineinherited

## ◆ mask() [3/4]

NodeMaskT * mask | ( | const size_t | idx | ) |
| inlineinherited

## ◆ mask() [4/4]

const NodeMaskT * mask | ( | const size_t | idx | ) | const
| inlineinherited

## ◆ maxSourcePointsPerVoxel()

template<typename PointDataTreeT>

size_t maxSourcePointsPerVoxel | ( |  | ) | const
| inline

## ◆ maxTargetPointsPerVoxel()

template<typename PointDataTreeT>

size_t maxTargetPointsPerVoxel | ( |  | ) | const
| inline

## ◆ neighbourThreshold()

template<typename PointDataTreeT>

size_t neighbourThreshold | ( |  | ) | const
| inline

## ◆ range() [1/2]

template<typename PointDataTreeT>

Vec3i range | ( |  | ) | const
| inline

## ◆ range() [2/2]

template<typename PointDataTreeT>

Vec3i range | ( | const Coord & | ,
|  | size_t | ) const
| inline

## ◆ searchRadius()

template<typename PointDataTreeT>

float searchRadius | ( |  | ) | const
| inline

## ◆ startPointLeaf()

template<typename PointDataTreeT>

bool startPointLeaf | ( | const typename PointDataTreeT::LeafNodeType & | leaf | ) |
| inline

## ◆ topology()

TreeType< 0 > & topology | ( |  | ) |
| inlineinherited

## Member Data Documentation

## ◆ mDxInv

template<typename PointDataTreeT>

const Real mDxInv
| protected

## ◆ mIndices

template<typename PointDataTreeT>

const AttrIndices& mIndices
| protected

## ◆ mManager

template<typename PointDataTreeT>

const tree::LeafManager<PointDataTreeT>& mManager
| protected

## ◆ mSettings

template<typename PointDataTreeT>

const PcaSettings& mSettings
| protected

## ◆ mSourcePosition

template<typename PointDataTreeT>

std::unique_ptr<PositionHandleT> mSourcePosition
| protected

## ◆ mTargetPosition

template<typename PointDataTreeT>

std::unique_ptr<PositionHandleT> mTargetPosition
| protected

## ◆ Size

const size_t Size
| staticinherited