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::Statistics
27{
53// Helps for backwards compatibility
55// Define how to print enumeration
56extern ITKStatistics_EXPORT std::ostream &
58
86
87template <typename THistogram>
88class ITK_TEMPLATE_EXPORT HistogramToRunLengthFeaturesFilter : public ProcessObject
89{
90public:
91 ITK_DISALLOW_COPY_AND_MOVE(HistogramToRunLengthFeaturesFilter);
92
98
100 itkOverrideGetNameOfClassMacro(HistogramToRunLengthFeaturesFilter);
101
103 itkNewMacro(Self);
104
105 using HistogramType = THistogram;
106 using HistogramPointer = typename HistogramType::Pointer;
107 using HistogramConstPointer = typename HistogramType::ConstPointer;
108 using MeasurementType = typename HistogramType::MeasurementType;
109 using MeasurementVectorType = typename HistogramType::MeasurementVectorType;
110 using IndexType = typename HistogramType::IndexType;
111 using FrequencyType = typename HistogramType::TotalAbsoluteFrequencyType;
112
116 void
117 SetInput(const HistogramType * histogram);
118 const HistogramType *
119 GetInput() const;
123
126
197 itkGetMacro(TotalNumberOfRuns, unsigned long);
198
199#if !defined(ITK_LEGACY_REMOVE)
201 static constexpr RunLengthFeatureEnum ShortRunEmphasis = RunLengthFeatureEnum::ShortRunEmphasis;
202 static constexpr RunLengthFeatureEnum LongRunEmphasis = RunLengthFeatureEnum::LongRunEmphasis;
203 static constexpr RunLengthFeatureEnum GreyLevelNonuniformity = RunLengthFeatureEnum::GreyLevelNonuniformity;
204 static constexpr RunLengthFeatureEnum RunLengthNonuniformity = RunLengthFeatureEnum::RunLengthNonuniformity;
205 static constexpr RunLengthFeatureEnum LowGreyLevelRunEmphasis = RunLengthFeatureEnum::LowGreyLevelRunEmphasis;
206 static constexpr RunLengthFeatureEnum HighGreyLevelRunEmphasis = RunLengthFeatureEnum::HighGreyLevelRunEmphasis;
207 static constexpr RunLengthFeatureEnum ShortRunLowGreyLevelEmphasis =
208 RunLengthFeatureEnum::ShortRunLowGreyLevelEmphasis;
209 static constexpr RunLengthFeatureEnum ShortRunHighGreyLevelEmphasis =
210 RunLengthFeatureEnum::ShortRunHighGreyLevelEmphasis;
211 static constexpr RunLengthFeatureEnum LongRunLowGreyLevelEmphasis = RunLengthFeatureEnum::LongRunLowGreyLevelEmphasis;
212 static constexpr RunLengthFeatureEnum LongRunHighGreyLevelEmphasis =
213 RunLengthFeatureEnum::LongRunHighGreyLevelEmphasis;
214#endif
215
219
220protected:
223 void
224 PrintSelf(std::ostream & os, Indent indent) const override;
225
230
231 void
232 GenerateData() override;
233
234private:
235 unsigned long m_TotalNumberOfRuns{};
236};
237
238} // namespace itk::Statistics
239
240#ifndef ITK_MANUAL_INSTANTIATION
241# include "itkHistogramToRunLengthFeaturesFilter.hxx"
242#endif
243
244#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)