ITK  5.2.0
Insight Toolkit
itkHistogramToRunLengthFeaturesFilter.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 itkHistogramToRunLengthFeaturesFilter_h
19 #define itkHistogramToRunLengthFeaturesFilter_h
20 
21 #include "itkHistogram.h"
22 #include "itkMacro.h"
23 #include "itkProcessObject.h"
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
35 {
36 public:
43  {
54  };
55 };
56 // Helps for backwards compatibility
58 // Define how to print enumeration
59 extern ITKStatistics_EXPORT std::ostream &
61 
100 template <typename THistogram>
101 class ITK_TEMPLATE_EXPORT HistogramToRunLengthFeaturesFilter : public ProcessObject
102 {
103 public:
104  ITK_DISALLOW_COPY_AND_MOVE(HistogramToRunLengthFeaturesFilter);
105 
111 
114 
116  itkNewMacro(Self);
117 
118  using HistogramType = THistogram;
119  using HistogramPointer = typename HistogramType::Pointer;
120  using HistogramConstPointer = typename HistogramType::ConstPointer;
121  using MeasurementType = typename HistogramType::MeasurementType;
122  using MeasurementVectorType = typename HistogramType::MeasurementVectorType;
124  using FrequencyType = typename HistogramType::TotalAbsoluteFrequencyType;
125 
127  using Superclass::SetInput;
128  void
129  SetInput(const HistogramType * histogram);
130  const HistogramType *
131  GetInput() const;
133 
136 
139 
142  GetShortRunEmphasis() const;
143  const MeasurementObjectType *
144  GetShortRunEmphasisOutput() const;
146 
149  GetLongRunEmphasis() const;
150  const MeasurementObjectType *
151  GetLongRunEmphasisOutput() const;
153 
156  GetGreyLevelNonuniformity() const;
157  const MeasurementObjectType *
158  GetGreyLevelNonuniformityOutput() const;
160 
163  GetRunLengthNonuniformity() const;
164  const MeasurementObjectType *
165  GetRunLengthNonuniformityOutput() const;
167 
170  GetLowGreyLevelRunEmphasis() const;
171  const MeasurementObjectType *
172  GetLowGreyLevelRunEmphasisOutput() const;
174 
177  GetHighGreyLevelRunEmphasis() const;
178  const MeasurementObjectType *
179  GetHighGreyLevelRunEmphasisOutput() const;
181 
184  GetShortRunLowGreyLevelEmphasis() const;
185  const MeasurementObjectType *
186  GetShortRunLowGreyLevelEmphasisOutput() const;
188 
191  GetShortRunHighGreyLevelEmphasis() const;
192  const MeasurementObjectType *
193  GetShortRunHighGreyLevelEmphasisOutput() const;
195 
198  GetLongRunLowGreyLevelEmphasis() const;
199  const MeasurementObjectType *
200  GetLongRunLowGreyLevelEmphasisOutput() const;
202 
205  GetLongRunHighGreyLevelEmphasis() const;
206  const MeasurementObjectType *
207  GetLongRunHighGreyLevelEmphasisOutput() const;
209 
210  itkGetMacro(TotalNumberOfRuns, unsigned long);
211 
212 #if !defined(ITK_LEGACY_REMOVE)
213 
214  static constexpr RunLengthFeatureEnum ShortRunEmphasis = RunLengthFeatureEnum::ShortRunEmphasis;
215  static constexpr RunLengthFeatureEnum LongRunEmphasis = RunLengthFeatureEnum::LongRunEmphasis;
216  static constexpr RunLengthFeatureEnum GreyLevelNonuniformity = RunLengthFeatureEnum::GreyLevelNonuniformity;
217  static constexpr RunLengthFeatureEnum RunLengthNonuniformity = RunLengthFeatureEnum::RunLengthNonuniformity;
218  static constexpr RunLengthFeatureEnum LowGreyLevelRunEmphasis = RunLengthFeatureEnum::LowGreyLevelRunEmphasis;
219  static constexpr RunLengthFeatureEnum HighGreyLevelRunEmphasis = RunLengthFeatureEnum::HighGreyLevelRunEmphasis;
220  static constexpr RunLengthFeatureEnum ShortRunLowGreyLevelEmphasis =
222  static constexpr RunLengthFeatureEnum ShortRunHighGreyLevelEmphasis =
224  static constexpr RunLengthFeatureEnum LongRunLowGreyLevelEmphasis = RunLengthFeatureEnum::LongRunLowGreyLevelEmphasis;
225  static constexpr RunLengthFeatureEnum LongRunHighGreyLevelEmphasis =
227 #endif
228 
231  GetFeature(RunLengthFeatureEnum feature);
232 
233 protected:
235  ~HistogramToRunLengthFeaturesFilter() override = default;
236  void
237  PrintSelf(std::ostream & os, Indent indent) const override;
238 
241  using Superclass::MakeOutput;
243 
244  void
245  GenerateData() override;
246 
247 private:
248  unsigned long m_TotalNumberOfRuns;
249 };
250 
251 } // end of namespace Statistics
252 } // end of namespace itk
253 
254 #ifndef ITK_MANUAL_INSTANTIATION
255 # include "itkHistogramToRunLengthFeaturesFilter.hxx"
256 #endif
257 
258 #endif
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::ShortRunLowGreyLevelEmphasis
itk::SimpleDataObjectDecorator
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Definition: itkSimpleDataObjectDecorator.h:66
itk::uint8_t
::uint8_t uint8_t
Definition: itkIntTypes.h:29
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::LongRunHighGreyLevelEmphasis
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::RunLengthNonuniformity
itk::Statistics::HistogramToRunLengthFeaturesFilter::m_TotalNumberOfRuns
unsigned long m_TotalNumberOfRuns
Definition: itkHistogramToRunLengthFeaturesFilter.h:248
itk::Statistics::HistogramToRunLengthFeaturesFilter::HistogramType
THistogram HistogramType
Definition: itkHistogramToRunLengthFeaturesFilter.h:118
itk::Statistics::HistogramToRunLengthFeaturesFilter::HistogramPointer
typename HistogramType::Pointer HistogramPointer
Definition: itkHistogramToRunLengthFeaturesFilter.h:119
itk::Statistics::HistogramToRunLengthFeaturesFilter::MeasurementVectorType
typename HistogramType::MeasurementVectorType MeasurementVectorType
Definition: itkHistogramToRunLengthFeaturesFilter.h:122
itk::Statistics::HistogramToRunLengthFeaturesFilter
This class computes texture feature coefficients from a grey level run-length matrix.
Definition: itkHistogramToRunLengthFeaturesFilter.h:101
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::Statistics::operator<<
ITKStatistics_EXPORT std::ostream & operator<<(std::ostream &out, const ExpectationMaximizationMixtureModelEstimatorEnums::TERMINATION_CODE value)
itk::Statistics::HistogramToRunLengthFeaturesFilter::IndexType
typename HistogramType::IndexType IndexType
Definition: itkHistogramToRunLengthFeaturesFilter.h:123
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::ShortRunEmphasis
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itkHistogram.h
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::LongRunLowGreyLevelEmphasis
itkMacro.h
itkProcessObject.h
itk::Statistics::HistogramToRunLengthFeaturesFilter::FrequencyType
typename HistogramType::TotalAbsoluteFrequencyType FrequencyType
Definition: itkHistogramToRunLengthFeaturesFilter.h:124
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::HighGreyLevelRunEmphasis
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature
RunLengthFeature
Definition: itkHistogramToRunLengthFeaturesFilter.h:42
itk::Statistics::HistogramToRunLengthFeaturesFilter::HistogramConstPointer
typename HistogramType::ConstPointer HistogramConstPointer
Definition: itkHistogramToRunLengthFeaturesFilter.h:120
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::HistogramToRunLengthFeaturesFilter::MeasurementType
typename HistogramType::MeasurementType MeasurementType
Definition: itkHistogramToRunLengthFeaturesFilter.h:121
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::ShortRunHighGreyLevelEmphasis
itkSimpleDataObjectDecorator.h
RunLengthFeature
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums
Contains all enum classes used by HistogramToRunLengthFeaturesFilter class.
Definition: itkHistogramToRunLengthFeaturesFilter.h:34
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::LongRunEmphasis
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::LowGreyLevelRunEmphasis
itk::Statistics::HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature::GreyLevelNonuniformity