go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkBinaryTreeSearchBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkBinaryTreeSearchBase_h
19 #define __itkBinaryTreeSearchBase_h
20 
21 #include "itkObject.h"
22 #include "itkArray.h"
23 
24 #include "itkBinaryTreeBase.h"
25 
26 namespace itk
27 {
28 
38 template< class TListSample >
39 class BinaryTreeSearchBase : public Object
40 {
41 public:
42 
45  typedef Object Superclass;
47  typedef SmartPointer< const Self > ConstPointer;
48 
50  itkTypeMacro( BinaryTreeSearchBase, Object );
51 
53  typedef TListSample ListSampleType;
56  typedef typename BinaryTreeType::
58  typedef Array< int > IndexArrayType;
59  typedef Array< double > DistanceArrayType;
60 
62  virtual void SetBinaryTree( BinaryTreeType * tree );
63 
64  const BinaryTreeType * GetBinaryTree( void ) const;
65 
67  itkSetMacro( KNearestNeighbors, unsigned int );
68  itkGetConstMacro( KNearestNeighbors, unsigned int );
69 
71  virtual void Search( const MeasurementVectorType & qp, IndexArrayType & ind,
72  DistanceArrayType & dists ) = 0;
73 
74 protected:
75 
77  virtual ~BinaryTreeSearchBase();
78 
80  BinaryTreePointer m_BinaryTree;
81  unsigned int m_KNearestNeighbors;
82  unsigned int m_DataDimension;
83 
84 private:
85 
86  BinaryTreeSearchBase( const Self & ); // purposely not implemented
87  void operator=( const Self & ); // purposely not implemented
88 
89 };
90 
91 } // end namespace itk
92 
93 #ifndef ITK_MANUAL_INSTANTIATION
94 #include "itkBinaryTreeSearchBase.hxx"
95 #endif
96 
97 #endif // end #ifndef __itkBinaryTreeSearchBase_h
virtual void SetBinaryTree(BinaryTreeType *tree)
virtual void Search(const MeasurementVectorType &qp, IndexArrayType &ind, DistanceArrayType &dists)=0
BinaryTreeBase< ListSampleType > BinaryTreeType
BinaryTreeType::Pointer BinaryTreePointer
const BinaryTreeType * GetBinaryTree(void) const
BinaryTreeType::MeasurementVectorType MeasurementVectorType
void operator=(const Self &)
SmartPointer< const Self > ConstPointer
SampleType::MeasurementVectorType MeasurementVectorType


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo