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.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 
00015 #ifndef __itkBinaryTreeSearchBase_h
00016 #define __itkBinaryTreeSearchBase_h
00017 
00018 #include "itkObject.h"
00019 #include "itkArray.h"
00020 
00021 #include "itkBinaryTreeBase.h"
00022 
00023 namespace itk
00024 {
00025 
00035   template < class TListSample >
00036   class BinaryTreeSearchBase : public Object
00037   {
00038   public:
00039 
00041     typedef BinaryTreeSearchBase        Self;
00042     typedef Object                      Superclass;
00043     typedef SmartPointer< Self >        Pointer;
00044     typedef SmartPointer< const Self >  ConstPointer;
00045 
00047     itkTypeMacro( BinaryTreeSearchBase, Object );
00048 
00050     typedef TListSample                 ListSampleType;
00051     typedef BinaryTreeBase< ListSampleType > BinaryTreeType;
00052     typedef typename BinaryTreeType::
00053       MeasurementVectorType             MeasurementVectorType;
00054     typedef Array< int >                IndexArrayType;
00055     typedef Array< double >             DistanceArrayType;
00056 
00058     virtual void SetBinaryTree( BinaryTreeType * tree );
00059     const BinaryTreeType * GetBinaryTree( void ) const;
00060 
00062     itkSetMacro( KNearestNeighbors, unsigned int );
00063     itkGetConstMacro( KNearestNeighbors, unsigned int );
00064 
00066     virtual void Search( const MeasurementVectorType & qp, IndexArrayType & ind,
00067       DistanceArrayType & dists ) = 0;
00068 
00069   protected:
00070 
00071     BinaryTreeSearchBase();
00072     virtual ~BinaryTreeSearchBase();
00073 
00075     typename BinaryTreeType::Pointer    m_BinaryTree;
00076     unsigned int   m_KNearestNeighbors;
00077     unsigned int   m_DataDimension;
00078 
00079   private:
00080 
00081     BinaryTreeSearchBase( const Self& );  // purposely not implemented
00082     void operator=( const Self& );        // purposely not implemented
00083 
00084   }; // end class BinaryTreeSearchBase
00085 
00086 
00087 } // end namespace itk
00088 
00089 
00090 #ifndef ITK_MANUAL_INSTANTIATION
00091 #include "itkBinaryTreeSearchBase.txx"
00092 #endif
00093 
00094 
00095 #endif // end #ifndef __itkBinaryTreeSearchBase_h
00096 


Generated on 24-10-2011 for elastix by doxygen 1.7.4 elastix logo