ITK  5.2.0
Insight Toolkit
itkStatisticsAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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
31 FloorLog(TSize size);
32 
33 template <typename TValue>
34 TValue
35 MedianOfThree(const TValue a, const TValue b, const TValue c);
36 
52 template <typename TSample>
53 void
54 FindSampleBound(const TSample * sample,
55  const typename TSample::ConstIterator & begin,
56  const typename TSample::ConstIterator & end,
57  typename TSample::MeasurementVectorType & min,
58  typename TSample::MeasurementVectorType & max);
59 
61 template <typename TSubsample>
62 void
63 FindSampleBoundAndMean(const TSubsample * sample,
64  int beginIndex,
65  int endIndex,
66  typename TSubsample::MeasurementVectorType & min,
67  typename TSubsample::MeasurementVectorType & max,
68  typename TSubsample::MeasurementVectorType & mean);
69 
91 template <typename TSubsample>
92 int
93 Partition(TSubsample * sample,
94  unsigned int activeDimension,
95  int beginIndex,
96  int endIndex,
97  const typename TSubsample::MeasurementType partitionValue);
98 
116 template <typename TSubsample>
117 typename TSubsample::MeasurementType
118 QuickSelect(TSubsample * sample,
119  unsigned int activeDimension,
120  int beginIndex,
121  int endIndex,
122  int kth,
123  typename TSubsample::MeasurementType medianGuess);
124 
139 template <typename TSubsample>
140 typename TSubsample::MeasurementType
141 QuickSelect(TSubsample * sample, unsigned int activeDimension, int beginIndex, int endIndex, int kth);
142 
151 template <typename TSubsample>
152 typename TSubsample::MeasurementType
153 NthElement(TSubsample * sample, unsigned int activeDimension, int beginIndex, int endIndex, int nth);
154 
155 template <typename TSubsample>
156 void
157 InsertSort(TSubsample * sample, unsigned int activeDimension, int beginIndex, int endIndex);
158 
159 template <typename TSubsample>
160 void
161 DownHeap(TSubsample * sample, unsigned int activeDimension, int beginIndex, int endIndex, int node);
162 
163 template <typename TSubsample>
164 void
165 HeapSort(TSubsample * sample, unsigned int activeDimension, int beginIndex, int endIndex);
166 
167 template <typename TSubsample>
168 void
169 IntrospectiveSortLoop(TSubsample * sample,
170  unsigned int activeDimension,
171  int beginIndex,
172  int endIndex,
173  int depthLimit,
174  int sizeThreshold);
175 
176 template <typename TSubsample>
177 void
178 IntrospectiveSort(TSubsample * sample, unsigned int activeDimension, int beginIndex, int endIndex, int sizeThreshold);
179 
180 } // end of namespace Algorithm
181 } // end of namespace Statistics
182 } // end of namespace itk
183 
184 #ifndef ITK_MANUAL_INSTANTIATION
185 # include "itkStatisticsAlgorithm.hxx"
186 #endif
187 
188 #endif // #ifndef itkStatisticsAlgorithm_h
itk::Statistics::Algorithm::Partition
int Partition(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, const typename TSubsample::MeasurementType partitionValue)
itk::Statistics::Algorithm::IntrospectiveSort
void IntrospectiveSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int sizeThreshold)
itkSubsample.h
itk::Statistics::Algorithm::FloorLog
TSize FloorLog(TSize size)
itk::Statistics::Algorithm::InsertSort
void InsertSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex)
itk::Statistics::Algorithm::IntrospectiveSortLoop
void IntrospectiveSortLoop(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int depthLimit, int sizeThreshold)
itk::Statistics::Algorithm::FindSampleBound
void FindSampleBound(const TSample *sample, const typename TSample::ConstIterator &begin, const typename TSample::ConstIterator &end, typename TSample::MeasurementVectorType &min, typename TSample::MeasurementVectorType &max)
itk::Statistics::Algorithm::FindSampleBoundAndMean
void FindSampleBoundAndMean(const TSubsample *sample, int beginIndex, int endIndex, typename TSubsample::MeasurementVectorType &min, typename TSubsample::MeasurementVectorType &max, typename TSubsample::MeasurementVectorType &mean)
itk::Statistics::Algorithm::QuickSelect
TSubsample::MeasurementType QuickSelect(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int kth, typename TSubsample::MeasurementType medianGuess)
itk::Statistics::Algorithm::NthElement
TSubsample::MeasurementType NthElement(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int nth)
itk::Statistics::Algorithm::HeapSort
void HeapSort(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex)
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::Algorithm::DownHeap
void DownHeap(TSubsample *sample, unsigned int activeDimension, int beginIndex, int endIndex, int node)
itk::Statistics::Algorithm::MedianOfThree
TValue MedianOfThree(const TValue a, const TValue b, const TValue c)