ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkStatisticsAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 __itkStatisticsAlgorithm_h
19 #define __itkStatisticsAlgorithm_h
20 
21 #include "itkSubsample.h"
22 
23 namespace itk
24 {
25 namespace Statistics
26 {
27 namespace Algorithm
28 {
29 #if !defined( _MSC_VER )
30 
31 template< typename TSize >
32 TSize FloorLog(TSize size);
33 
34 template< typename TValue >
35 TValue MedianOfThree(const TValue a, const TValue b, const TValue c);
36 
52 template< typename TSample >
53 void FindSampleBound(const TSample * sample,
54  const typename TSample::ConstIterator & begin,
55  const typename TSample::ConstIterator & end,
56  typename TSample::MeasurementVectorType & min,
57  typename TSample::MeasurementVectorType & max);
58 
60 template< typename TSubsample >
61 void FindSampleBoundAndMean(const TSubsample * sample,
62  int beginIndex,
63  int endIndex,
64  typename TSubsample::MeasurementVectorType & min,
65  typename TSubsample::MeasurementVectorType & max,
66  typename TSubsample::MeasurementVectorType & mean);
67 
89 template< typename TSubsample >
90 int Partition(TSubsample *sample,
91  unsigned int activeDimension,
92  int beginIndex, int endIndex,
93  const typename TSubsample::MeasurementType partitionValue);
94 
112 template< typename TSubsample >
113 typename TSubsample::MeasurementType
114 QuickSelect(TSubsample * sample,
115  unsigned int activeDimension,
116  int beginIndex, int endIndex,
117  int kth,
118  typename TSubsample::MeasurementType medianGuess);
119 
134 template< typename TSubsample >
135 typename TSubsample::MeasurementType
136 QuickSelect(TSubsample *sample,
137  unsigned int activeDimension,
138  int beginIndex, int endIndex,
139  int kth);
140 
149 template< typename TSubsample >
150 typename TSubsample::MeasurementType
151 NthElement(TSubsample *sample,
152  unsigned int activeDimension,
153  int beginIndex, int endIndex,
154  int nth);
155 
156 template< typename TSubsample >
157 void InsertSort(TSubsample *sample,
158  unsigned int activeDimension,
159  int beginIndex, int endIndex);
160 
161 template< typename TSubsample >
162 void DownHeap(TSubsample *sample,
163  unsigned int activeDimension,
164  int beginIndex, int endIndex, int node);
165 
166 template< typename TSubsample >
167 void HeapSort(TSubsample *sample,
168  unsigned int activeDimension,
169  int beginIndex, int endIndex);
170 
171 template< typename TSubsample >
172 void IntrospectiveSortLoop(TSubsample *sample,
173  unsigned int activeDimension,
174  int beginIndex,
175  int endIndex,
176  int depthLimit,
177  int sizeThreshold);
178 
179 template< typename TSubsample >
180 void IntrospectiveSort(TSubsample *sample,
181  unsigned int activeDimension,
182  int beginIndex, int endIndex,
183  int sizeThreshold);
184 
185 #endif // #if defined(_MSC_VER)
186 } // end of namespace Algorithm
187 } // end of namespace Statistics
188 } // end of namespace itk
189 
190 #ifndef ITK_MANUAL_INSTANTIATION
191 #include "itkStatisticsAlgorithm.hxx"
192 #endif
193 
194 #endif // #ifndef __itkStatisticsAlgorithm_h
void FindSampleBoundAndMean(const TSubsample *sample, int beginIndex, int endIndex, typename TSubsample::MeasurementVectorType &min, typename TSubsample::MeasurementVectorType &max, typename TSubsample::MeasurementVectorType &mean)
TSize FloorLog(TSize size)
int Partition(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, const typename TSubsample::MeasurementType partitionValue)
TSubsample::MeasurementType QuickSelect(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int kth, typename TSubsample::MeasurementType medianGuess)
void IntrospectiveSortLoop(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int depthLimit, int sizeThreshold)
void InsertSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex)
void DownHeap(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int node)
void FindSampleBound(const TSample *sample, const typename TSample::ConstIterator &begin, const typename TSample::ConstIterator &end, typename TSample::MeasurementVectorType &min, typename TSample::MeasurementVectorType &max)
TValue MedianOfThree(const TValue a, const TValue b, const TValue c)
void HeapSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex)
TSubsample::MeasurementType NthElement(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int nth)
void IntrospectiveSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int sizeThreshold)