ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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 * https://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
26namespace itk
27{
28namespace Statistics
29{
55// Helps for backwards compatibility
57// Define how to print enumeration
58extern ITKStatistics_EXPORT std::ostream &
60
88
89template <typename THistogram>
90class ITK_TEMPLATE_EXPORT HistogramToRunLengthFeaturesFilter : public ProcessObject
91{
92public:
93 ITK_DISALLOW_COPY_AND_MOVE(HistogramToRunLengthFeaturesFilter);
94
100
102 itkOverrideGetNameOfClassMacro(HistogramToRunLengthFeaturesFilter);
103
105 itkNewMacro(Self);
106
107 using HistogramType = THistogram;
108 using HistogramPointer = typename HistogramType::Pointer;
109 using HistogramConstPointer = typename HistogramType::ConstPointer;
110 using MeasurementType = typename HistogramType::MeasurementType;
111 using MeasurementVectorType = typename HistogramType::MeasurementVectorType;
112 using IndexType = typename HistogramType::IndexType;
113 using FrequencyType = typename HistogramType::TotalAbsoluteFrequencyType;
114
117 void
118 SetInput(const HistogramType * histogram);
119 const HistogramType *
120 GetInput() const;
122
125
128
135
142
149
156
163
170
177
184
191
198
199 itkGetMacro(TotalNumberOfRuns, unsigned long);
200
201#if !defined(ITK_LEGACY_REMOVE)
203 static constexpr RunLengthFeatureEnum ShortRunEmphasis = RunLengthFeatureEnum::ShortRunEmphasis;
204 static constexpr RunLengthFeatureEnum LongRunEmphasis = RunLengthFeatureEnum::LongRunEmphasis;
205 static constexpr RunLengthFeatureEnum GreyLevelNonuniformity = RunLengthFeatureEnum::GreyLevelNonuniformity;
206 static constexpr RunLengthFeatureEnum RunLengthNonuniformity = RunLengthFeatureEnum::RunLengthNonuniformity;
207 static constexpr RunLengthFeatureEnum LowGreyLevelRunEmphasis = RunLengthFeatureEnum::LowGreyLevelRunEmphasis;
208 static constexpr RunLengthFeatureEnum HighGreyLevelRunEmphasis = RunLengthFeatureEnum::HighGreyLevelRunEmphasis;
209 static constexpr RunLengthFeatureEnum ShortRunLowGreyLevelEmphasis =
210 RunLengthFeatureEnum::ShortRunLowGreyLevelEmphasis;
211 static constexpr RunLengthFeatureEnum ShortRunHighGreyLevelEmphasis =
212 RunLengthFeatureEnum::ShortRunHighGreyLevelEmphasis;
213 static constexpr RunLengthFeatureEnum LongRunLowGreyLevelEmphasis = RunLengthFeatureEnum::LongRunLowGreyLevelEmphasis;
214 static constexpr RunLengthFeatureEnum LongRunHighGreyLevelEmphasis =
215 RunLengthFeatureEnum::LongRunHighGreyLevelEmphasis;
216#endif
217
221
222protected:
225 void
226 PrintSelf(std::ostream & os, Indent indent) const override;
227
232
233 void
234 GenerateData() override;
235
236private:
237 unsigned long m_TotalNumberOfRuns{};
238};
239
240} // end of namespace Statistics
241} // end of namespace itk
242
243#ifndef ITK_MANUAL_INSTANTIATION
244# include "itkHistogramToRunLengthFeaturesFilter.hxx"
245#endif
246
247#endif
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition itkIndent.h:50
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
Decorates any "simple" data type (data types without smart pointers) with a DataObject API.
Implements transparent reference counting.
Contains all enum classes used by HistogramToRunLengthFeaturesFilter class.
typename HistogramType::MeasurementVectorType MeasurementVectorType
const MeasurementObjectType * GetLongRunLowGreyLevelEmphasisOutput() const
void SetInput(const HistogramType *histogram)
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
const MeasurementObjectType * GetShortRunHighGreyLevelEmphasisOutput() const
const MeasurementObjectType * GetShortRunLowGreyLevelEmphasisOutput() const
typename HistogramType::TotalAbsoluteFrequencyType FrequencyType
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override
Make a DataObject of the correct type to used as the specified output.
const MeasurementObjectType * GetGreyLevelNonuniformityOutput() const
const MeasurementObjectType * GetHighGreyLevelRunEmphasisOutput() const
const MeasurementObjectType * GetShortRunEmphasisOutput() const
const MeasurementObjectType * GetRunLengthNonuniformityOutput() const
void PrintSelf(std::ostream &os, Indent indent) const override
const MeasurementObjectType * GetLongRunEmphasisOutput() const
const MeasurementObjectType * GetLowGreyLevelRunEmphasisOutput() const
MeasurementType GetFeature(RunLengthFeatureEnum feature)
const MeasurementObjectType * GetLongRunHighGreyLevelEmphasisOutput() const
HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature RunLengthFeatureEnum
ITKStatistics_EXPORT std::ostream & operator<<(std::ostream &out, const ExpectationMaximizationMixtureModelEstimatorEnums::TERMINATION_CODE value)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....