VAPOR3 3.9.4
Public Member Functions | List of all members
VAPoR::KDTreeRGSubset Class Reference

This class implements a k-d tree for a structured grid over a reduced region-of-interest (ROI) More...

#include <KDTreeRG.h>

Public Member Functions

 KDTreeRGSubset ()
 
 KDTreeRGSubset (const KDTreeRG *kdtreerg, const std::vector< size_t > &min, const std::vector< size_t > &max)
 
 ~KDTreeRGSubset ()
 
void Nearest (const std::vector< float > &coordu, std::vector< size_t > &coord) const
 
void Nearest (const std::vector< double > &coordu, std::vector< size_t > &index) const
 
std::vector< size_t > GetDimensions () const
 

Detailed Description

This class implements a k-d tree for a structured grid over a reduced region-of-interest (ROI)

class KDTreeRGSubset

This class provides a k-d tree for a structured grid over an ROI. The class constructor is passed a pointer to a KDTreeRG instance that defines a k-d tree over a structured grid. This class can be used to cull out points outside of an axis-aligned region of interest specified by min and max. The advantage of using this class over simply creating a new instance of KDTreeRG is the avoidance of the cost of rebuilding the k-d tree from scratch.

Definition at line 168 of file KDTreeRG.h.

Constructor & Destructor Documentation

◆ KDTreeRGSubset() [1/2]

VAPoR::KDTreeRGSubset::KDTreeRGSubset ( )

◆ KDTreeRGSubset() [2/2]

VAPoR::KDTreeRGSubset::KDTreeRGSubset ( const KDTreeRG kdtreerg,
const std::vector< size_t > &  min,
const std::vector< size_t > &  max 
)

Construct a KDTreeRGSubset instance.

Construct a KDTreeRGSubset instance.

Parameters
[in]kdtreergA pointer to a KDTreeRG instance. The pointer is shallow copied and the referenced contents should remain valid until this class instance is destroyed.
[in]minA two or three element vector of ijk coordinate indeces of the first grid point defined by xg, yg, and zg.
[in]maxA two or three element vector of ijk coordinate indeces of the last grid point defined by xg, yg, and zg.
Note
kdtreerg is shallow copied and the referenced contents should remain valid until this class instance is destroyed.

◆ ~KDTreeRGSubset()

VAPoR::KDTreeRGSubset::~KDTreeRGSubset ( )
inline

Definition at line 190 of file KDTreeRG.h.

Member Function Documentation

◆ GetDimensions()

std::vector< size_t > VAPoR::KDTreeRGSubset::GetDimensions ( ) const
inline

Definition at line 215 of file KDTreeRG.h.

◆ Nearest() [1/2]

void VAPoR::KDTreeRGSubset::Nearest ( const std::vector< double > &  coordu,
std::vector< size_t > &  index 
) const
inline

Definition at line 208 of file KDTreeRG.h.

◆ Nearest() [2/2]

void VAPoR::KDTreeRGSubset::Nearest ( const std::vector< float > &  coordu,
std::vector< size_t > &  coord 
) const

Return indecies of nearest point

This method returns the ijk index of the grid vertex nearest, by measure of Cartesian distance, a specified point. The returned indecies may be used to access the xg, yg, and zg Grid instances passed into the constructor used to create kdtreerg.

Parameters
[in]coorduA 2D or 3D vector of user coordinates specifying the location of a point in space.
[out]indexThe ijk indecies of the grid vertex nearest coordu.

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