ITK  5.0.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 template< typename TSize >
30 TSize FloorLog(TSize size);
31 
32 template< typename TValue >
33 TValue MedianOfThree(const TValue a, const TValue b, const TValue c);
34 
50 template< typename TSample >
51 void FindSampleBound(const TSample * sample,
52  const typename TSample::ConstIterator & begin,
53  const typename TSample::ConstIterator & end,
54  typename TSample::MeasurementVectorType & min,
55  typename TSample::MeasurementVectorType & max);
56 
58 template< typename TSubsample >
59 void FindSampleBoundAndMean(const TSubsample * sample,
60  int beginIndex,
61  int endIndex,
62  typename TSubsample::MeasurementVectorType & min,
63  typename TSubsample::MeasurementVectorType & max,
64  typename TSubsample::MeasurementVectorType & mean);
65 
87 template< typename TSubsample >
88 int Partition(TSubsample *sample,
89  unsigned int activeDimension,
90  int beginIndex, int endIndex,
91  const typename TSubsample::MeasurementType partitionValue);
92 
110 template< typename TSubsample >
111 typename TSubsample::MeasurementType
112 QuickSelect(TSubsample * sample,
113  unsigned int activeDimension,
114  int beginIndex, int endIndex,
115  int kth,
116  typename TSubsample::MeasurementType medianGuess);
117 
132 template< typename TSubsample >
133 typename TSubsample::MeasurementType
134 QuickSelect(TSubsample *sample,
135  unsigned int activeDimension,
136  int beginIndex, int endIndex,
137  int kth);
138 
147 template< typename TSubsample >
148 typename TSubsample::MeasurementType
149 NthElement(TSubsample *sample,
150  unsigned int activeDimension,
151  int beginIndex, int endIndex,
152  int nth);
153 
154 template< typename TSubsample >
155 void InsertSort(TSubsample *sample,
156  unsigned int activeDimension,
157  int beginIndex, int endIndex);
158 
159 template< typename TSubsample >
160 void DownHeap(TSubsample *sample,
161  unsigned int activeDimension,
162  int beginIndex, int endIndex, int node);
163 
164 template< typename TSubsample >
165 void HeapSort(TSubsample *sample,
166  unsigned int activeDimension,
167  int beginIndex, int endIndex);
168 
169 template< typename TSubsample >
170 void IntrospectiveSortLoop(TSubsample *sample,
171  unsigned int activeDimension,
172  int beginIndex,
173  int endIndex,
174  int depthLimit,
175  int sizeThreshold);
176 
177 template< typename TSubsample >
178 void IntrospectiveSort(TSubsample *sample,
179  unsigned int activeDimension,
180  int beginIndex, int endIndex,
181  int sizeThreshold);
182 
183 } // end of namespace Algorithm
184 } // end of namespace Statistics
185 } // end of namespace itk
186 
187 #ifndef ITK_MANUAL_INSTANTIATION
188 #include "itkStatisticsAlgorithm.hxx"
189 #endif
190 
191 #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)