ITK  5.0.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< typename THistogram >
66 class ITK_TEMPLATE_EXPORT HistogramToRunLengthFeaturesFilter : public ProcessObject
67 {
68 public:
69  ITK_DISALLOW_COPY_AND_ASSIGN(HistogramToRunLengthFeaturesFilter);
70 
76 
79 
81  itkNewMacro( Self );
82 
83  using HistogramType = THistogram;
84  using HistogramPointer = typename HistogramType::Pointer;
85  using HistogramConstPointer = typename HistogramType::ConstPointer;
86  using MeasurementType = typename HistogramType::MeasurementType;
87  using MeasurementVectorType = typename HistogramType::MeasurementVectorType;
89  using FrequencyType = typename HistogramType::TotalAbsoluteFrequencyType;
90 
92  using Superclass::SetInput;
93  void SetInput ( const HistogramType * histogram );
94  const HistogramType * GetInput() const;
96 
99 
102 
104  MeasurementType GetShortRunEmphasis() const;
105  const MeasurementObjectType* GetShortRunEmphasisOutput() const;
107 
109  MeasurementType GetLongRunEmphasis() const;
110  const MeasurementObjectType* GetLongRunEmphasisOutput() const;
112 
114  MeasurementType GetGreyLevelNonuniformity() const;
115  const MeasurementObjectType* GetGreyLevelNonuniformityOutput() const;
117 
119  MeasurementType GetRunLengthNonuniformity() const;
120  const MeasurementObjectType* GetRunLengthNonuniformityOutput() const;
122 
124  MeasurementType GetLowGreyLevelRunEmphasis() const;
125  const MeasurementObjectType* GetLowGreyLevelRunEmphasisOutput() const;
127 
129  MeasurementType GetHighGreyLevelRunEmphasis() const;
130  const MeasurementObjectType* GetHighGreyLevelRunEmphasisOutput() const;
132 
134  MeasurementType GetShortRunLowGreyLevelEmphasis() const;
135  const MeasurementObjectType* GetShortRunLowGreyLevelEmphasisOutput() const;
137 
139  MeasurementType GetShortRunHighGreyLevelEmphasis() const;
140  const MeasurementObjectType* GetShortRunHighGreyLevelEmphasisOutput() const;
142 
144  MeasurementType GetLongRunLowGreyLevelEmphasis() const;
145  const MeasurementObjectType* GetLongRunLowGreyLevelEmphasisOutput() const;
147 
149  MeasurementType GetLongRunHighGreyLevelEmphasis() const;
150  const MeasurementObjectType* GetLongRunHighGreyLevelEmphasisOutput() const;
152 
153  itkGetMacro( TotalNumberOfRuns, unsigned long );
154 
156  typedef enum
157  {
167  LongRunHighGreyLevelEmphasis
168  } RunLengthFeatureName;
169 
171  MeasurementType GetFeature( RunLengthFeatureName name );
172 
173 protected:
175  ~HistogramToRunLengthFeaturesFilter() override = default;
176  void PrintSelf(std::ostream& os, Indent indent) const override;
177 
180  using Superclass::MakeOutput;
181  DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) override;
182 
183  void GenerateData() override;
184 
185 private:
186  unsigned long m_TotalNumberOfRuns;
187 
188 };
189 
190 } // end of namespace Statistics
191 } // end of namespace itk
192 
193 #ifndef ITK_MANUAL_INSTANTIATION
194 #include "itkHistogramToRunLengthFeaturesFilter.hxx"
195 #endif
196 
197 #endif
Light weight base class for most itk classes.
This class computes texture feature coefficients from a grey level run-length matrix.
typename HistogramType::MeasurementVectorType MeasurementVectorType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
Decorates any &quot;simple&quot; data type (data types without smart pointers) with a DataObject API...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
SmartPointer< Self > Pointer
typename HistogramType::TotalAbsoluteFrequencyType FrequencyType