#include <PointLocator.h>
Classes | |
struct | FeatureInfo |
Public Types | |
typedef Array< FeatureInfo > | FeatureList |
List of point features to use for nearest neighbor search. | |
Public Member Functions | |
Array< int > | FindClosestNPoints (int k, double *point, Array< double > *dist2=NULL) |
Array< int > | FindClosestNPoints (int k, vtkPointSet *dataset, const Array< int > *sample, int index, const FeatureList *features, Array< double > *dist2=NULL) |
Array< int > | FindClosestNPoints (int k, vtkPointSet *dataset, const Array< int > *sample, int index, Array< double > *dist2=NULL) |
Array< int > | FindClosestNPoints (int k, vtkPointSet *dataset, int index, const FeatureList *features, Array< double > *dist2=NULL) |
Array< int > | FindClosestNPoints (int k, vtkPointSet *dataset, int index, Array< double > *dist2=NULL) |
Array< Array< int > > | FindClosestNPoints (int k, vtkPointSet *dataset, const Array< int > *sample, const FeatureList *features, Array< Array< double > > *dist2=NULL) |
Array< Array< int > > | FindClosestNPoints (int k, vtkPointSet *dataset, const Array< int > *sample, Array< Array< double > > *dist2=NULL) |
Array< Array< int > > | FindClosestNPoints (int k, vtkPointSet *dataset, const FeatureList *features, Array< Array< double > > *dist2=NULL) |
Array< Array< int > > | FindClosestNPoints (int k, vtkPointSet *dataset, Array< Array< double > > *dist2=NULL) |
int | FindClosestPoint (double *point, double *dist2=NULL) |
int | FindClosestPoint (vtkPointSet *dataset, const Array< int > *sample, int index, const FeatureList *features, double *dist2=NULL) |
int | FindClosestPoint (vtkPointSet *dataset, int index, const FeatureList *features, double *dist2=NULL) |
int | FindClosestPoint (vtkPointSet *dataset, const Array< int > *sample, int index, double *dist2=NULL) |
int | FindClosestPoint (vtkPointSet *dataset, int index, double *dist2=NULL) |
Array< int > | FindClosestPoint (vtkPointSet *dataset, const Array< int > *sample, const FeatureList *features, Array< double > *dist2=NULL) |
Array< int > | FindClosestPoint (vtkPointSet *dataset, const FeatureList *features, Array< double > *dist2=NULL) |
Array< int > | FindClosestPoint (vtkPointSet *dataset, const Array< int > *sample, Array< double > *dist2=NULL) |
Array< int > | FindClosestPoint (vtkPointSet *dataset, Array< double > *dist2=NULL) |
Array< int > | FindPointsWithinRadius (double radius, double *point, Array< double > *dist2=NULL) |
Array< int > | FindPointsWithinRadius (double radius, vtkPointSet *dataset, const Array< int > *sample, int index, const FeatureList *features, Array< double > *dist2=NULL) |
Array< int > | FindPointsWithinRadius (double radius, vtkPointSet *dataset, const Array< int > *sample, int index, Array< double > *dist2=NULL) |
Array< int > | FindPointsWithinRadius (double radius, vtkPointSet *dataset, int index, const FeatureList *features, Array< double > *dist2=NULL) |
Array< int > | FindPointsWithinRadius (double radius, vtkPointSet *dataset, int index, Array< double > *dist2=NULL) |
Array< Array< int > > | FindPointsWithinRadius (double radius, vtkPointSet *dataset, const Array< int > *sample, const FeatureList *features, Array< Array< double > > *dist2=NULL) |
Array< Array< int > > | FindPointsWithinRadius (double radius, vtkPointSet *dataset, const Array< int > *sample, Array< Array< double > > *dist2=NULL) |
Array< Array< int > > | FindPointsWithinRadius (double radius, vtkPointSet *dataset, const FeatureList *features, Array< Array< double > > *dist2=NULL) |
Array< Array< int > > | FindPointsWithinRadius (double radius, vtkPointSet *dataset, Array< Array< double > > *dist2=NULL) |
mirtkPublicAggregateMacro (vtkPointSet, DataSet) | |
Dataset for which search structure is build. | |
mirtkPublicAggregateMacro (const Array< int >, Sample) | |
Indices of points to consider only or NULL. | |
mirtkPublicAttributeMacro (FeatureList, Features) | |
Indices/names and rescaling parameters of point data arrays. | |
mirtkPublicAttributeMacro (bool, GlobalIndices) | |
Return global _DataSet point indices instead of _Sample indices. | |
mirtkReadOnlyAttributeMacro (int, NumberOfPoints) | |
Number of points in search structure. | |
mirtkReadOnlyAttributeMacro (int, PointDimension) | |
Dimension of feature Arrays/points. | |
virtual | ~PointLocator () |
Destructor. | |
Public Member Functions inherited from mirtk::Object | |
virtual const char * | NameOfClass () const =0 |
Get name of class, which this object is an instance of. | |
virtual ParameterList | Parameter () const |
Get parameter name/value pairs. | |
bool | Parameter (const ParameterList &) |
Set parameters from name/value pairs. | |
virtual bool | Set (const char *name, const char *value) |
virtual | ~Object () |
Destructor. | |
Static Public Member Functions | |
static double | Distance2BetweenPoints (const double *a, const double *b, int d=3) |
static Array< Array< int > > | FindClosestNPoints (int k, vtkPointSet *dataset1, const Array< int > *sample1, const FeatureList *features1, vtkPointSet *dataset2, const Array< int > *sample2, const FeatureList *features2, Array< Array< double > > *dist2=NULL) |
static Array< int > | FindClosestPoint (vtkPointSet *dataset1, const Array< int > *sample1, const FeatureList *features1, vtkPointSet *dataset2, const Array< int > *sample2, const FeatureList *features2, Array< double > *dist2=NULL) |
static Array< Array< int > > | FindPointsWithinRadius (double radius, vtkPointSet *dataset1, const Array< int > *sample1, const FeatureList *features1, vtkPointSet *dataset2, const Array< int > *sample2, const FeatureList *features2, Array< Array< double > > *dist2=NULL) |
static vtkDataArray * | GetDataArray (vtkPointSet *dataset, const FeatureInfo &feature) |
static int | GetNumberOfPoints (vtkPointSet *dataset, const Array< int > *sample=NULL) |
static void | GetPoint (Point &point, vtkPointSet *dataset, const Array< int > *sample, int index) |
static void | GetPoint (double *point, vtkPointSet *dataset, const Array< int > *sample, int index, const FeatureList *feature=NULL) |
static void | GetPoint (double *point, vtkPointSet *dataset, int index, const FeatureList *feature=NULL) |
static int | GetPointDimension (vtkPointSet *dataset, const FeatureList *feature) |
static int | GetPointIndex (vtkPointSet *dataset, const Array< int > *sample, int index) |
static PointLocator * | New (vtkPointSet *dataset, const Array< int > *sample=NULL, const FeatureList *feature=NULL) |
Static Public Member Functions inherited from mirtk::Object | |
static const char * | NameOfType () |
Get name of this class type. | |
Public Attributes | |
SharedPtr< FlannPointLocator > | _FlannLocator |
FLANN point locator used for higher-dimensional feature spaces when available. | |
vtkSmartPointer< vtkOctreePointLocator > | _VtkLocator |
VTK point locator used for three-dimensional feature spaces. | |
Protected Member Functions | |
void | Initialize () |
Initialize point locator. | |
PointLocator () | |
Constructor. | |
Protected Member Functions inherited from mirtk::Object | |
template<typename... Args> | |
void | Throw (ErrorType err, const char *func, Args... args) const |
Additional Inherited Members | |
Static Protected Member Functions inherited from mirtk::Object | |
template<typename... Args> | |
static void | ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args) |
Point search structure for establishing point correspondences
This point locator implementation is specialized for use by PointCorrespondence subclass implementations. It allows the search of nearest neighbors within the n-dimensional feature space spanned by the feature arrays used to establish point correspondences.
The implementation uses either VTK for point search in three dimensions or FLANN for higher dimensional feature spaces if available. Alternatively, an ITK Kd tree is used if the library is available. As last resort, a brute force search without actual Kd tree search structure is performed.
Definition at line 68 of file PointLocator.h.
|
inlinestatic |
Calculate squared Euclidean distance between feature Arrays
[in] | a | First feature Array. |
[in] | b | Second feature Array. |
[in] | d | Dimension of feature Arrays. |
Definition at line 746 of file PointLocator.h.
Array<int> mirtk::PointLocator::FindClosestNPoints | ( | int | k, |
double * | point, | ||
Array< double > * | dist2 = NULL |
||
) |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | point | Query point. |
[out] | dist2 | Squared Euclidean distance of closest point. |
d
.
|
inline |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
d
. Definition at line 832 of file PointLocator.h.
|
inline |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
d
. Definition at line 852 of file PointLocator.h.
|
inline |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | index | Index of point in dataset . |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
d
. Definition at line 844 of file PointLocator.h.
|
inline |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | index | Index of point in dataset . |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
d
. Definition at line 860 of file PointLocator.h.
Array<Array<int> > mirtk::PointLocator::FindClosestNPoints | ( | int | k, |
vtkPointSet * | dataset, | ||
const Array< int > * | sample, | ||
const FeatureList * | features, | ||
Array< Array< double > > * | dist2 = NULL |
||
) |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
dataset
, indices of closest k
points.
|
inline |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
dataset
, indices of closest k
points. Definition at line 874 of file PointLocator.h.
|
inline |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
dataset
, indices of closest k
points. Definition at line 867 of file PointLocator.h.
|
inline |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
dataset
, indices of closest k
points. Definition at line 881 of file PointLocator.h.
|
inlinestatic |
Find k nearest neighbors
[in] | k | Number of nearest neighbors to find. |
[in] | dataset1 | Dataset whose nearest neighbor is queried. |
[in] | sample1 | Indices of points in dataset1 to consider only or NULL for all. |
[in] | features1 | Indices and weights of point data in dataset1 to use. |
[in] | dataset2 | Dataset in which to perform nearest neighbor search. |
[in] | sample2 | Indices of points in dataset2 to consider only or NULL for all. |
[in] | features2 | Indices and weights of point data in dataset2 to use. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset1
, indices of closest k
points in dataset2
. Definition at line 888 of file PointLocator.h.
int mirtk::PointLocator::FindClosestPoint | ( | double * | point, |
double * | dist2 = NULL |
||
) |
Find closest point
[in] | point | Query point. |
[out] | dist2 | Squared Euclidean distance of closest point. |
point
.
|
inline |
Find closest point
[in] | dataset | Dataset whose nearest neighbor is queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset
. Definition at line 762 of file PointLocator.h.
|
inline |
Find closest point
[in] | dataset | Dataset whose nearest neighbor is queried. |
[in] | index | Index of point in dataset or sample (if not NULL). |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset
. Definition at line 774 of file PointLocator.h.
|
inline |
Find closest point
[in] | dataset | Dataset whose nearest neighbor is queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset
. Definition at line 782 of file PointLocator.h.
|
inline |
Find closest point
[in] | dataset | Dataset whose nearest neighbor is queried. |
[in] | index | Index of point in dataset . |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset
. Definition at line 790 of file PointLocator.h.
Array<int> mirtk::PointLocator::FindClosestPoint | ( | vtkPointSet * | dataset, |
const Array< int > * | sample, | ||
const FeatureList * | features, | ||
Array< double > * | dist2 = NULL |
||
) |
Find closest point
[in] | dataset | Dataset whose nearest neighbor is queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset
.
|
inline |
Find closest point
[in] | dataset | Dataset whose nearest neighbor is queried. |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset
. Definition at line 797 of file PointLocator.h.
|
inline |
Find closest point
[in] | dataset | Dataset whose nearest neighbor is queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset
. Definition at line 804 of file PointLocator.h.
|
inline |
Find closest point
[in] | dataset | Dataset whose nearest neighbor is queried. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset
. Definition at line 811 of file PointLocator.h.
|
inlinestatic |
Find closest point
[in] | dataset1 | Dataset whose nearest neighbor is queried. |
[in] | sample1 | Indices of points in dataset1 to consider only or NULL for all. |
[in] | features1 | Indices and weights of point data in dataset1 to use. |
[in] | dataset2 | Dataset in which to perform nearest neighbor search. |
[in] | sample2 | Indices of points in dataset2 to consider only or NULL for all. |
[in] | features2 | Indices and weights of point data in dataset2 to use. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset2
which are closest to each point in dataset1
. Definition at line 818 of file PointLocator.h.
Array<int> mirtk::PointLocator::FindPointsWithinRadius | ( | double | radius, |
double * | point, | ||
Array< double > * | dist2 = NULL |
||
) |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | point | Query point. |
[out] | dist2 | Squared Euclidean distance of closest point. |
d
.
|
inline |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
d
. Definition at line 902 of file PointLocator.h.
|
inline |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
d
. Definition at line 922 of file PointLocator.h.
|
inline |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | index | Index of point in dataset . |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
d
. Definition at line 914 of file PointLocator.h.
|
inline |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | index | Index of point in dataset . |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
d
. Definition at line 930 of file PointLocator.h.
Array<Array<int> > mirtk::PointLocator::FindPointsWithinRadius | ( | double | radius, |
vtkPointSet * | dataset, | ||
const Array< int > * | sample, | ||
const FeatureList * | features, | ||
Array< Array< double > > * | dist2 = NULL |
||
) |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
dataset
, indices of points within search radius
.
|
inline |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
dataset
, indices of points within search radius
. Definition at line 945 of file PointLocator.h.
|
inline |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[in] | features | Indices and weights of point data in dataset to use. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
dataset
, indices of points within search radius
. Definition at line 937 of file PointLocator.h.
|
inline |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset | Dataset whose nearest neighbors are queried. |
[out] | dist2 | Squared Euclidean distance of found nearest neighbors. |
dataset
, indices of points within search radius
. Definition at line 952 of file PointLocator.h.
|
inlinestatic |
Find neighbors within search radius
[in] | radius | Search radius in N-D point feature space. |
[in] | dataset1 | Dataset whose nearest neighbor is queried. |
[in] | sample1 | Indices of points in dataset1 to consider only or NULL for all. |
[in] | features1 | Indices and weights of point data in dataset1 to use. |
[in] | dataset2 | Dataset in which to perform nearest neighbor search. |
[in] | sample2 | Indices of points in dataset2 to consider only or NULL for all. |
[in] | features2 | Indices and weights of point data in dataset2 to use. |
[out] | dist2 | Squared Euclidean distance of closest point. |
dataset1
, indices of points in dataset2
within search radius
. Definition at line 959 of file PointLocator.h.
|
inlinestatic |
Get point data array
[in] | dataset | Dataset. |
[in] | feature | Index/name and weight/rescaling parameters. |
Definition at line 657 of file PointLocator.h.
|
inlinestatic |
Get number of points
[in] | dataset | Dataset. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
Definition at line 665 of file PointLocator.h.
|
inlinestatic |
Get spatial (sample) point
[out] | point | Spatial point. |
[in] | dataset | Dataset. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
Definition at line 701 of file PointLocator.h.
|
inlinestatic |
Get feature Array
[out] | point | Feature Array. |
[in] | dataset | Dataset. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
[in] | feature | Indices/names and weights/rescaling parameters of features. |
Definition at line 711 of file PointLocator.h.
|
inlinestatic |
Get feature Array
[out] | point | Feature Array. |
[in] | dataset | Dataset. |
[in] | index | Index of point in dataset . |
[in] | feature | Indices/names and weights/rescaling parameters of features. |
Definition at line 739 of file PointLocator.h.
|
inlinestatic |
Get size of feature Arrays
[in] | dataset | Dataset. |
[in] | feature | Indices/names and weights/rescaling parameters of features. |
Definition at line 671 of file PointLocator.h.
|
inlinestatic |
Get index of feature Array
[in] | dataset | Dataset. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | index | Index of point in dataset or sample (if not NULL). |
dataset
. Definition at line 694 of file PointLocator.h.
|
static |
Construct new point locator for search in given dataset
[in] | dataset | Dataset in which points are searched. |
[in] | sample | Indices of points in dataset to consider only or NULL for all. |
[in] | feature | Indices and weights of point data in dataset to use. |