#include <itkStatNearestNeighborFinder.h>
Inheritance diagram for itk::NearestNeighborFinder:
Public Types | |
typedef TDataSet | DataSetType |
typedef TPoint | PointType |
typedef std::vector< PointType > | OutputType |
typedef NearestNeighborFinder | Self |
typedef LightProcessObject | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
Public Methods | |
virtual const char * | GetClassName () const |
void | SetInputParams (int K, DataSetType *dataSet, PointType *queryPoint) throw (InvalidInputError) |
OutputType | GetOutput () throw (InvalidInputError) |
Static Public Methods | |
Pointer | New () |
Protected Types | |
typedef std::vector< NeighborType > | NeighborsType |
Protected Methods | |
NearestNeighborFinder () | |
void | GenerateData () |
NeighborsType::iterator | FindReplacement (double distance) |
void | CopyOutput () |
double | GetDistance (PointType *A, PointType *B) |
This class is templated over the dataset (set of samples) and the data-point (sample) types. Users have to use New() method to create an instance of this class. With the input parameters (number of neighbors - K, pointer to dataset, and pointer to the query point) set by SetInputParams function, it will search k number of nearest neighbors which are determined by an euclidean distance function. Users can get the vector (std) which has k number of data-point by calling GetOutput() function.
NOTE: Current implementaion expects the dataset and data-point types are containers that support ForwardIterator interface.
Definition at line 44 of file itkStatNearestNeighborFinder.h.
|
Reimplemented from itk::LightProcessObject. Definition at line 76 of file itkStatNearestNeighborFinder.h. |
|
Save Template parameter TPoint Definition at line 50 of file itkStatNearestNeighborFinder.h. |
|
typedef of a vector (std) of the Neighbor struct This will be used for creation of temporary result of K-nearest neighbor search Definition at line 149 of file itkStatNearestNeighborFinder.h. |
|
return type of the GetOutput() function Definition at line 60 of file itkStatNearestNeighborFinder.h. |
|
Smart pointer typedef support. Reimplemented from itk::LightProcessObject. Definition at line 75 of file itkStatNearestNeighborFinder.h. |
|
Save Template parameter TPoint Definition at line 55 of file itkStatNearestNeighborFinder.h. |
|
Standard "Self" typedef. Reimplemented from itk::LightProcessObject. Definition at line 65 of file itkStatNearestNeighborFinder.h. |
|
Standard "Superclass" typedef. Reimplemented from itk::LightProcessObject. Definition at line 70 of file itkStatNearestNeighborFinder.h. |
|
constructor |
|
Extracts only the data-point portion of the final search result from the m_Neighbors and copy them to m_Output which will be used by GetOutput() function. It is used by GenerateData() |
|
With the given distance parameter, it will try to find if there is any data-point in the m_Neighbors (temporary result storage) is not closer to the query point than the distance. If any, it will return the iterator of the first such data-point. If not, it will return the iterator of the last element in the M_neighbors. It is used by GenerateData(). |
|
Perform the actual K-nearest neighbor search. Reimplemented from itk::LightProcessObject. |
|
Run-time type information (and related methods). Reimplemented from itk::LightProcessObject. |
|
Get euclidean between the data-point A and the data-point B. |
|
Return result No argument required. This will return a vector (std) of data-points which are determined as K-nearest neighbors. If the parameters haven't been properly set by SetInputParams function, it will throw the InvalidInputError of this class. |
|
Method for creation through the object factory. Reimplemented from itk::LightProcessObject. |
|
Set input paraments User should provides the number of neighbors (K), the pointer to the dataset (samples), and the pointer to the query point which will be evaluated with every sample in the dataset which is specifed by samples parameter This will throw InvalidInputError (of this class) exception if the K is smaller than the size of samples or the size of queryPoint is equal to or less than 0. |