ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkHistogramToRunLengthFeaturesFilter.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 __itkHistogramToRunLengthFeaturesFilter_h
19 #define __itkHistogramToRunLengthFeaturesFilter_h
20 
21 #include "itkHistogram.h"
22 #include "itkMacro.h"
23 #include "itkProcessObject.h"
25 
26 namespace itk {
27 namespace Statistics {
65 template< class THistogram >
67 {
68 public:
74 
77 
79  itkNewMacro( Self );
80 
81  typedef THistogram HistogramType;
82  typedef typename HistogramType::Pointer HistogramPointer;
83  typedef typename HistogramType::ConstPointer HistogramConstPointer;
84  typedef typename HistogramType::MeasurementType MeasurementType;
85  typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
86  typedef typename HistogramType::IndexType IndexType;
87  typedef typename HistogramType::
88  TotalAbsoluteFrequencyType FrequencyType;
89 
91  using Superclass::SetInput;
92  void SetInput ( const HistogramType * histogram );
93  const HistogramType * GetInput() const;
95 
98 
101 
103  MeasurementType GetShortRunEmphasis() const;
104  const MeasurementObjectType* GetShortRunEmphasisOutput() const;
106 
108  MeasurementType GetLongRunEmphasis() const;
109  const MeasurementObjectType* GetLongRunEmphasisOutput() const;
111 
113  MeasurementType GetGreyLevelNonuniformity() const;
114  const MeasurementObjectType* GetGreyLevelNonuniformityOutput() const;
116 
118  MeasurementType GetRunLengthNonuniformity() const;
119  const MeasurementObjectType* GetRunLengthNonuniformityOutput() const;
121 
123  MeasurementType GetLowGreyLevelRunEmphasis() const;
124  const MeasurementObjectType* GetLowGreyLevelRunEmphasisOutput() const;
126 
128  MeasurementType GetHighGreyLevelRunEmphasis() const;
129  const MeasurementObjectType* GetHighGreyLevelRunEmphasisOutput() const;
131 
133  MeasurementType GetShortRunLowGreyLevelEmphasis() const;
134  const MeasurementObjectType* GetShortRunLowGreyLevelEmphasisOutput() const;
136 
138  MeasurementType GetShortRunHighGreyLevelEmphasis() const;
139  const MeasurementObjectType* GetShortRunHighGreyLevelEmphasisOutput() const;
141 
143  MeasurementType GetLongRunLowGreyLevelEmphasis() const;
144  const MeasurementObjectType* GetLongRunLowGreyLevelEmphasisOutput() const;
146 
148  MeasurementType GetLongRunHighGreyLevelEmphasis() const;
149  const MeasurementObjectType* GetLongRunHighGreyLevelEmphasisOutput() const;
151 
152  itkGetMacro( TotalNumberOfRuns, unsigned long );
153 
155  typedef enum
156  {
166  LongRunHighGreyLevelEmphasis
167  } RunLengthFeatureName;
168 
170  MeasurementType GetFeature( RunLengthFeatureName name );
171 
172 protected:
175  void PrintSelf(std::ostream& os, Indent indent) const;
176 
179  using Superclass::MakeOutput;
181 
182  void GenerateData();
183 
184 private:
185  HistogramToRunLengthFeaturesFilter(const Self&); //purposely not implemented
186  void operator=(const Self&); //purposely not implemented
187 
188  unsigned long m_TotalNumberOfRuns;
189 
190 };
191 
192 } // end of namespace Statistics
193 } // end of namespace itk
194 
195 #ifndef ITK_MANUAL_INSTANTIATION
196 #include "itkHistogramToRunLengthFeaturesFilter.hxx"
197 #endif
198 
199 #endif
200