00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkStatisticsAlgorithm_h
00018 #define __itkStatisticsAlgorithm_h
00019
00020 #include "itkSample.h"
00021 #include "itkSubsample.h"
00022
00023 namespace itk{
00024 namespace Statistics{
00025
00026 #if !defined(_MSC_VER)
00027
00028 template< class TSize >
00029 TSize FloorLog(TSize size) ;
00030
00031 template< class TValue >
00032 TValue MedianOfThree(const TValue a, const TValue b, const TValue c) ;
00033
00034 template< class TSample >
00035 void FindSampleBound(const TSample* sample,
00036 typename TSample::ConstIterator begin,
00037 typename TSample::ConstIterator end,
00038 typename TSample::MeasurementVectorType &min,
00039 typename TSample::MeasurementVectorType &max) ;
00040
00041 template< class TSubsample >
00042 void FindSampleBoundAndMean(const TSubsample* sample,
00043 int beginIndex,
00044 int endIndex,
00045 typename TSubsample::MeasurementVectorType &min,
00046 typename TSubsample::MeasurementVectorType &max,
00047 typename TSubsample::MeasurementVectorType &mean) ;
00048
00049 template< class TSubsample >
00050 int Partition(TSubsample* sample,
00051 unsigned int activeDimension,
00052 int beginIndex, int endIndex,
00053 const typename TSubsample::MeasurementType partitionValue) ;
00054
00055 template< class TSubsample >
00056 typename TSubsample::MeasurementType
00057 QuickSelect(TSubsample* sample,
00058 unsigned int activeDimension,
00059 int beginIndex, int endIndex,
00060 int kth,
00061 typename TSubsample::MeasurementType medianGuess) ;
00062
00063 template< class TSubsample >
00064 typename TSubsample::MeasurementType
00065 QuickSelect(TSubsample* sample,
00066 unsigned int activeDimension,
00067 int beginIndex, int endIndex,
00068 int kth) ;
00069
00070 template< class TSubsample >
00071 void InsertSort(TSubsample* sample,
00072 unsigned int activeDimension,
00073 int beginIndex, int endIndex) ;
00074
00075 template< class TSubsample >
00076 void DownHeap(TSubsample* sample,
00077 unsigned int activeDimension,
00078 int beginIndex, int endIndex, int node) ;
00079
00080 template< class TSubsample >
00081 void HeapSort(TSubsample* sample,
00082 unsigned int activeDimension,
00083 int beginIndex, int endIndex) ;
00084
00085
00086 template< class TSubsample >
00087 void IntrospectiveSortLoop(TSubsample* sample,
00088 unsigned int activeDimension,
00089 int beginIndex,
00090 int endIndex,
00091 int depthLimit,
00092 int sizeThreshold) ;
00093
00094 template< class TSubsample >
00095 void IntrospectiveSort(TSubsample* sample,
00096 unsigned int activeDimension,
00097 int beginIndex, int endIndex,
00098 int sizeThreshold) ;
00099
00100 #endif // #if defined(_MSC_VER)
00101
00102 }
00103 }
00104
00105 #ifndef ITK_MANUAL_INSTANTIATION
00106 #include "itkStatisticsAlgorithm.txx"
00107 #endif
00108
00109 #endif // #ifndef __itkStatisticsAlgorithm_h
00110
00111
00112
00113