Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
itkEnhancedHistogramToTextureFeaturesFilter.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 * 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 __itkEnhancedHistogramToTextureFeaturesFilter_h
19 #define __itkEnhancedHistogramToTextureFeaturesFilter_h
20 
21 #include "itkHistogram.h"
22 #include "itkMacro.h"
23 #include "itkProcessObject.h"
24 #include "itkSimpleDataObjectDecorator.h"
25 
27 #define itkMacroGLCMFeatureGetter(name) \
28  const MeasurementObjectType * Get##name##Output() const; \
29  \
30  MeasurementType Get##name() const;
31 
32 namespace itk
33 {
34  namespace Statistics
35  {
102  template< typename THistogram >
103  class EnhancedHistogramToTextureFeaturesFilter:public ProcessObject
104  {
105  public:
108  typedef ProcessObject Superclass;
111 
113  itkTypeMacro(EnhancedHistogramToTextureFeaturesFilter, ProcessObject);
114 
116  itkNewMacro(Self);
117 
118  typedef THistogram HistogramType;
119  typedef typename HistogramType::Pointer HistogramPointer;
120  typedef typename HistogramType::ConstPointer HistogramConstPointer;
121  typedef typename HistogramType::MeasurementType MeasurementType;
122  typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
123  typedef typename HistogramType::IndexType IndexType;
124  typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType;
125  typedef typename HistogramType::RelativeFrequencyType RelativeFrequencyType;
126 
127  typedef typename HistogramType::TotalAbsoluteFrequencyType
129 
130  typedef typename HistogramType::TotalRelativeFrequencyType
132 
134  typedef std::vector< RelativeFrequencyType > RelativeFrequencyContainerType;
135 
137  using Superclass::SetInput;
138  void SetInput(const HistogramType *histogram);
139 
140  const HistogramType * GetInput() const;
141 
143  typedef DataObject::Pointer DataObjectPointer;
144 
146  typedef SimpleDataObjectDecorator< MeasurementType > MeasurementObjectType;
147 
149  MeasurementType GetEnergy() const;
150 
151  const MeasurementObjectType * GetEnergyOutput() const;
152 
154  MeasurementType GetEntropy() const;
155 
156  const MeasurementObjectType * GetEntropyOutput() const;
157 
160 
162 
165 
167 
169  MeasurementType GetInertia() const;
170 
171  const MeasurementObjectType * GetInertiaOutput() const;
172 
175 
177 
180 
182 
185 
187 
208 
210  typedef enum {
241 
244 
245  protected:
248  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
249 
251  typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
252  using Superclass::MakeOutput;
254 
255  void GenerateData() ITK_OVERRIDE;
256 
257  private:
258  EnhancedHistogramToTextureFeaturesFilter(const Self &); //purposely not implemented
259  void operator=(const Self &); //purposely not implemented
260 
261  void ComputeMeansAndVariances(double & pixelMean, double & marginalMean,
262  double & marginalDevSquared, double & pixelVariance);
263 
264  RelativeFrequencyContainerType m_RelativeFrequencyContainer;
265  };
266  } // end of namespace Statistics
267 } // end of namespace itk
268 
269 #ifndef ITK_MANUAL_INSTANTIATION
270 #include "itkEnhancedHistogramToTextureFeaturesFilter.hxx"
271 #endif
272 
273 #endif
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::MakeOutput
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::DataObjectPointer
DataObject::Pointer DataObjectPointer
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:143
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::DataObjectPointerArraySizeType
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:251
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::JointAverage
@ JointAverage
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:236
itkMacroGLCMFeatureGetter
#define itkMacroGLCMFeatureGetter(name)
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:27
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetClusterShadeOutput
const MeasurementObjectType * GetClusterShadeOutput() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::MaximumProbability
@ MaximumProbability
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:222
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetCorrelationOutput
const MeasurementObjectType * GetCorrelationOutput() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:110
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::HistogramConstPointer
HistogramType::ConstPointer HistogramConstPointer
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:120
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::AbsoluteFrequencyType
HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:124
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::TotalAbsoluteFrequencyType
HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:128
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::InverseDifference
@ InverseDifference
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:235
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetFeature
MeasurementType GetFeature(TextureFeatureName name)
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Variance
@ Variance
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:226
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetInertiaOutput
const MeasurementObjectType * GetInertiaOutput() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Superclass
ProcessObject Superclass
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:108
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Homogeneity1
@ Homogeneity1
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:224
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Entropy
@ Entropy
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:212
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::RelativeFrequencyContainerType
std::vector< RelativeFrequencyType > RelativeFrequencyContainerType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:134
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::EnhancedHistogramToTextureFeaturesFilter
EnhancedHistogramToTextureFeaturesFilter()
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetHaralickCorrelationOutput
const MeasurementObjectType * GetHaralickCorrelationOutput() const
itk::SmartPointer< Self >
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetInput
const HistogramType * GetInput() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Self
EnhancedHistogramToTextureFeaturesFilter Self
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:107
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Correlation
@ Correlation
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:213
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetInverseDifferenceMomentOutput
const MeasurementObjectType * GetInverseDifferenceMomentOutput() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::TextureFeatureName
TextureFeatureName
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:210
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Contrast
@ Contrast
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:220
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::InverseVariance
@ InverseVariance
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:223
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::MeasurementObjectType
SimpleDataObjectDecorator< MeasurementType > MeasurementObjectType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:146
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetClusterShade
MeasurementType GetClusterShade() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::MeasurementVectorType
HistogramType::MeasurementVectorType MeasurementVectorType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:122
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::DifferenceVariance
@ DifferenceVariance
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:232
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Inertia
@ Inertia
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:215
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetEnergyOutput
const MeasurementObjectType * GetEnergyOutput() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetClusterProminenceOutput
const MeasurementObjectType * GetClusterProminenceOutput() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetEntropyOutput
const MeasurementObjectType * GetEntropyOutput() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetEntropy
MeasurementType GetEntropy() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::ClusterShade
@ ClusterShade
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:216
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::DifferenceAverage
@ DifferenceAverage
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:230
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Energy
@ Energy
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:211
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetEnergy
MeasurementType GetEnergy() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::SumAverage
@ SumAverage
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:227
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::TotalRelativeFrequencyType
HistogramType::TotalRelativeFrequencyType TotalRelativeFrequencyType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:131
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter
This class computes texture feature coefficients from a grey level co-occurrence matrix.
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:103
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::InverseDifferenceMoment
@ InverseDifferenceMoment
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:214
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Dissimilarity
@ Dissimilarity
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:221
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::SecondMeasureOfInformationCorrelation
@ SecondMeasureOfInformationCorrelation
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:238
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetHaralickCorrelation
MeasurementType GetHaralickCorrelation() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::InverseDifferenceMomentNormalized
@ InverseDifferenceMomentNormalized
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:233
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::InvalidFeatureName
@ InvalidFeatureName
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:239
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::HaralickCorrelation
@ HaralickCorrelation
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:218
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::HistogramType
THistogram HistogramType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:116
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetClusterProminence
MeasurementType GetClusterProminence() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::HistogramPointer
HistogramType::Pointer HistogramPointer
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:119
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::SumEntropy
@ SumEntropy
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:228
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::InverseDifferenceNormalized
@ InverseDifferenceNormalized
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:234
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::~EnhancedHistogramToTextureFeaturesFilter
~EnhancedHistogramToTextureFeaturesFilter() override
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:247
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetInverseDifferenceMoment
MeasurementType GetInverseDifferenceMoment() const
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetInertia
MeasurementType GetInertia() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GenerateData
void GenerateData() ITK_OVERRIDE
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::RelativeFrequencyType
HistogramType::RelativeFrequencyType RelativeFrequencyType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:125
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::FirstMeasureOfInformationCorrelation
@ FirstMeasureOfInformationCorrelation
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:237
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::ClusterTendency
@ ClusterTendency
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:225
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Autocorrelation
@ Autocorrelation
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:219
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::GetCorrelation
MeasurementType GetCorrelation() const
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::DifferenceEntropy
@ DifferenceEntropy
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:231
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::MeasurementType
HistogramType::MeasurementType MeasurementType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:121
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::Pointer
SmartPointer< Self > Pointer
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:109
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::SumVariance
@ SumVariance
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:229
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::ClusterProminence
@ ClusterProminence
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:217
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::SetInput
void SetInput(const HistogramType *histogram)
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter::IndexType
HistogramType::IndexType IndexType
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:123