ITK  4.4.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< class TSize >
32 TSize FloorLog(TSize size);
33 
34 template< class TValue >
35 TValue MedianOfThree(const TValue a, const TValue b, const TValue c);
36 
37 template< class TSample >
38 void FindSampleBound(const TSample * sample,
39  typename TSample::ConstIterator begin,
40  typename TSample::ConstIterator end,
41  typename TSample::MeasurementVectorType & min,
42  typename TSample::MeasurementVectorType & max);
43 
44 template< class TSubsample >
45 void FindSampleBoundAndMean(const TSubsample * sample,
46  int beginIndex,
47  int endIndex,
48  typename TSubsample::MeasurementVectorType & min,
49  typename TSubsample::MeasurementVectorType & max,
50  typename TSubsample::MeasurementVectorType & mean);
51 
64 template< class TSubsample >
65 int Partition(TSubsample *sample,
66  unsigned int activeDimension,
67  int beginIndex, int endIndex,
68  const typename TSubsample::MeasurementType partitionValue);
69 
78 template< class TSubsample >
79 typename TSubsample::MeasurementType
80 QuickSelect(TSubsample * sample,
81  unsigned int activeDimension,
82  int beginIndex, int endIndex,
83  int kth,
84  typename TSubsample::MeasurementType medianGuess);
85 
92 template< class TSubsample >
93 typename TSubsample::MeasurementType
94 QuickSelect(TSubsample *sample,
95  unsigned int activeDimension,
96  int beginIndex, int endIndex,
97  int kth);
98 
105 template< class TSubsample >
106 typename TSubsample::MeasurementType
107 NthElement(TSubsample *sample,
108  unsigned int activeDimension,
109  int beginIndex, int endIndex,
110  int nth);
111 
112 template< class TSubsample >
113 void InsertSort(TSubsample *sample,
114  unsigned int activeDimension,
115  int beginIndex, int endIndex);
116 
117 template< class TSubsample >
118 void DownHeap(TSubsample *sample,
119  unsigned int activeDimension,
120  int beginIndex, int endIndex, int node);
121 
122 template< class TSubsample >
123 void HeapSort(TSubsample *sample,
124  unsigned int activeDimension,
125  int beginIndex, int endIndex);
126 
127 template< class TSubsample >
128 void IntrospectiveSortLoop(TSubsample *sample,
129  unsigned int activeDimension,
130  int beginIndex,
131  int endIndex,
132  int depthLimit,
133  int sizeThreshold);
134 
135 template< class TSubsample >
136 void IntrospectiveSort(TSubsample *sample,
137  unsigned int activeDimension,
138  int beginIndex, int endIndex,
139  int sizeThreshold);
140 
141 #endif // #if defined(_MSC_VER)
142 } // end of namespace Algorithm
143 } // end of namespace Statistics
144 } // end of namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkStatisticsAlgorithm.hxx"
148 #endif
149 
150 #endif // #ifndef __itkStatisticsAlgorithm_h
151