ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkStatisticsAlgorithm.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkStatisticsAlgorithm_h
00019 #define __itkStatisticsAlgorithm_h
00020 
00021 #include "itkSubsample.h"
00022 
00023 namespace itk
00024 {
00025 namespace Statistics
00026 {
00027 namespace Algorithm
00028 {
00029 #if !defined( _MSC_VER )
00030 
00031 template< class TSize >
00032 TSize FloorLog(TSize size);
00033 
00034 template< class TValue >
00035 TValue MedianOfThree(const TValue a, const TValue b, const TValue c);
00036 
00037 template< class TSample >
00038 void FindSampleBound(const TSample * sample,
00039                      typename TSample::ConstIterator begin,
00040                      typename TSample::ConstIterator end,
00041                      typename TSample::MeasurementVectorType & min,
00042                      typename TSample::MeasurementVectorType & max);
00043 
00044 template< class TSubsample >
00045 void FindSampleBoundAndMean(const TSubsample * sample,
00046                             int beginIndex,
00047                             int endIndex,
00048                             typename TSubsample::MeasurementVectorType & min,
00049                             typename TSubsample::MeasurementVectorType & max,
00050                             typename TSubsample::MeasurementVectorType & mean);
00051 
00064 template< class TSubsample >
00065 int Partition(TSubsample *sample,
00066               unsigned int activeDimension,
00067               int beginIndex, int endIndex,
00068               const typename TSubsample::MeasurementType partitionValue);
00069 
00078 template< class TSubsample >
00079 typename TSubsample::MeasurementType
00080 QuickSelect(TSubsample * sample,
00081             unsigned int activeDimension,
00082             int beginIndex, int endIndex,
00083             int kth,
00084             typename TSubsample::MeasurementType medianGuess);
00085 
00092 template< class TSubsample >
00093 typename TSubsample::MeasurementType
00094 QuickSelect(TSubsample *sample,
00095             unsigned int activeDimension,
00096             int beginIndex, int endIndex,
00097             int kth);
00098 
00105 template< class TSubsample >
00106 typename TSubsample::MeasurementType
00107 NthElement(TSubsample *sample,
00108            unsigned int activeDimension,
00109            int beginIndex, int endIndex,
00110            int nth);
00111 
00112 template< class TSubsample >
00113 void InsertSort(TSubsample *sample,
00114                 unsigned int activeDimension,
00115                 int beginIndex, int endIndex);
00116 
00117 template< class TSubsample >
00118 void DownHeap(TSubsample *sample,
00119               unsigned int activeDimension,
00120               int beginIndex, int endIndex, int node);
00121 
00122 template< class TSubsample >
00123 void HeapSort(TSubsample *sample,
00124               unsigned int activeDimension,
00125               int beginIndex, int endIndex);
00126 
00127 template< class TSubsample >
00128 void IntrospectiveSortLoop(TSubsample *sample,
00129                            unsigned int activeDimension,
00130                            int beginIndex,
00131                            int endIndex,
00132                            int depthLimit,
00133                            int sizeThreshold);
00134 
00135 template< class TSubsample >
00136 void IntrospectiveSort(TSubsample *sample,
00137                        unsigned int activeDimension,
00138                        int beginIndex, int endIndex,
00139                        int sizeThreshold);
00140 
00141 #endif // #if defined(_MSC_VER)
00142 } // end of namespace Algorithm
00143 } // end of namespace Statistics
00144 } // end of namespace itk
00145 
00146 #ifndef ITK_MANUAL_INSTANTIATION
00147 #include "itkStatisticsAlgorithm.hxx"
00148 #endif
00149 
00150 #endif // #ifndef __itkStatisticsAlgorithm_h
00151