ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkHistogramToTextureFeaturesFilter.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 itkHistogramToTextureFeaturesFilter_h
19#define itkHistogramToTextureFeaturesFilter_h
20
21#include "itkHistogram.h"
22#include "itkMacro.h"
23#include "itkProcessObject.h"
25
26namespace itk
27{
28namespace Statistics
29{
54// Define how to print enumeration
55extern ITKStatistics_EXPORT std::ostream &
57
117
118template <typename THistogram>
119class ITK_TEMPLATE_EXPORT HistogramToTextureFeaturesFilter : public ProcessObject
120{
121public:
122 ITK_DISALLOW_COPY_AND_MOVE(HistogramToTextureFeaturesFilter);
123
129
131 itkOverrideGetNameOfClassMacro(HistogramToTextureFeaturesFilter);
132
134 itkNewMacro(Self);
135
136 using HistogramType = THistogram;
137 using HistogramPointer = typename HistogramType::Pointer;
138 using HistogramConstPointer = typename HistogramType::ConstPointer;
139 using MeasurementType = typename HistogramType::MeasurementType;
140 using MeasurementVectorType = typename HistogramType::MeasurementVectorType;
141 using IndexType = typename HistogramType::IndexType;
142 using AbsoluteFrequencyType = typename HistogramType::AbsoluteFrequencyType;
143 using RelativeFrequencyType = typename HistogramType::RelativeFrequencyType;
144
145 using TotalAbsoluteFrequencyType = typename HistogramType::TotalAbsoluteFrequencyType;
146
147 using TotalRelativeFrequencyType = typename HistogramType::TotalRelativeFrequencyType;
148
150 using RelativeFrequencyContainerType = std::vector<RelativeFrequencyType>;
151
154 void
155 SetInput(const HistogramType * histogram);
156
157 const HistogramType *
158 GetInput() const;
159
162
165
168 GetEnergy() const;
169
172
175 GetEntropy() const;
176
179
183
186
190
193
196 GetInertia() const;
197
200
204
207
211
214
218
221
223#if !defined(ITK_LEGACY_REMOVE)
225 static constexpr TextureFeatureEnum Energy = TextureFeatureEnum::Energy;
226 static constexpr TextureFeatureEnum Entropy = TextureFeatureEnum::Entropy;
227 static constexpr TextureFeatureEnum Correlation = TextureFeatureEnum::Correlation;
228 static constexpr TextureFeatureEnum InverseDifferenceMoment = TextureFeatureEnum::InverseDifferenceMoment;
229 static constexpr TextureFeatureEnum Inertia = TextureFeatureEnum::Inertia;
230 static constexpr TextureFeatureEnum ClusterShade = TextureFeatureEnum::ClusterShade;
231 static constexpr TextureFeatureEnum ClusterProminence = TextureFeatureEnum::ClusterProminence;
232 static constexpr TextureFeatureEnum HaralickCorrelation = TextureFeatureEnum::HaralickCorrelation;
233 static constexpr TextureFeatureEnum InvalidFeatureName = TextureFeatureEnum::InvalidFeatureName;
234#endif
235
239
240protected:
243 void
244 PrintSelf(std::ostream & os, Indent indent) const override;
245
250
251 void
252 GenerateData() override;
253
254private:
255 void
256 ComputeMeansAndVariances(double & pixelMean,
257 double & marginalMean,
258 double & marginalDevSquared,
259 double & pixelVariance);
260
262};
263} // end of namespace Statistics
264} // end of namespace itk
265
266#ifndef ITK_MANUAL_INSTANTIATION
267# include "itkHistogramToTextureFeaturesFilter.hxx"
268#endif
269
270#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.
This class contains all enum classes used by HistogramToTextureFeaturesFilter class.
typename HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override
Make a DataObject of the correct type to used as the specified output.
const MeasurementObjectType * GetHaralickCorrelationOutput() const
const MeasurementObjectType * GetEnergyOutput() const
typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType
void SetInput(const HistogramType *histogram)
void PrintSelf(std::ostream &os, Indent indent) const override
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
const MeasurementObjectType * GetInertiaOutput() const
typename HistogramType::TotalRelativeFrequencyType TotalRelativeFrequencyType
const MeasurementObjectType * GetCorrelationOutput() const
const MeasurementObjectType * GetClusterShadeOutput() const
SimpleDataObjectDecorator< MeasurementType > MeasurementObjectType
MeasurementType GetFeature(TextureFeatureEnum feature)
HistogramToTextureFeaturesFilterEnums::TextureFeature TextureFeatureEnum
const MeasurementObjectType * GetClusterProminenceOutput() const
void ComputeMeansAndVariances(double &pixelMean, double &marginalMean, double &marginalDevSquared, double &pixelVariance)
const MeasurementObjectType * GetInverseDifferenceMomentOutput() const
typename HistogramType::MeasurementVectorType MeasurementVectorType
const MeasurementObjectType * GetEntropyOutput() const
typename HistogramType::RelativeFrequencyType RelativeFrequencyType
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....