Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
itkEnhancedScalarImageToTextureFeaturesFilter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 /*=========================================================================
14 *
15 * Copyright Insight Software Consortium
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License");
18 * you may not use this file except in compliance with the License.
19 * You may obtain a copy of the License at
20 *
21 * https://www.apache.org/licenses/LICENSE-2.0.txt
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS,
25 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 * See the License for the specific language governing permissions and
27 * limitations under the License.
28 *
29 *=========================================================================*/
30 #ifndef __itkEnhancedScalarImageToTextureFeaturesFilter_h
31 #define __itkEnhancedScalarImageToTextureFeaturesFilter_h
32 
33 #include "itkDataObjectDecorator.h"
34 
36 #include "itkScalarImageToCooccurrenceMatrixFilter.h"
37 
38 namespace itk
39 {
40  namespace Statistics
41  {
116  template< typename TImageType,
117  typename THistogramFrequencyContainer = DenseFrequencyContainer2 >
119  {
120  public:
123  typedef ProcessObject Superclass;
126 
128  itkTypeMacro(EnhancedScalarImageToTextureFeaturesFilter, ProcessObject);
129 
131  itkNewMacro(Self);
132 
133  typedef THistogramFrequencyContainer FrequencyContainerType;
134  typedef TImageType ImageType;
135  typedef typename ImageType::Pointer ImagePointer;
136 
137  typedef typename ImageType::PixelType PixelType;
138  typedef typename ImageType::OffsetType OffsetType;
139  typedef VectorContainer< unsigned char, OffsetType > OffsetVector;
140  typedef typename OffsetVector::Pointer OffsetVectorPointer;
141  typedef typename OffsetVector::ConstPointer OffsetVectorConstPointer;
142 
143  typedef ScalarImageToCooccurrenceMatrixFilter<
145 
146  typedef typename CooccurrenceMatrixFilterType::HistogramType HistogramType;
148 
149  typedef short TextureFeatureName;
150  typedef VectorContainer< unsigned char, TextureFeatureName > FeatureNameVector;
151 
152  typedef typename FeatureNameVector::Pointer FeatureNameVectorPointer;
153  typedef typename FeatureNameVector::ConstPointer FeatureNameVectorConstPointer;
154  typedef VectorContainer< unsigned char, double > FeatureValueVector;
155  typedef typename FeatureValueVector::Pointer FeatureValueVectorPointer;
156 
158  typedef DataObject::Pointer DataObjectPointer;
159 
161  typedef DataObjectDecorator< FeatureValueVector >
163 
165 
167 
170  using Superclass::SetInput;
171  void SetInput(const ImageType *);
172 
173  const ImageType * GetInput() const;
174 
176  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
177  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
178 
180  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
181  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
182 
185  itkSetConstObjectMacro(Offsets, OffsetVector);
186  itkGetConstObjectMacro(Offsets, OffsetVector);
187 
190  void SetNumberOfBinsPerAxis(unsigned int);
191 
194  void SetPixelValueMinMax(PixelType min, PixelType max);
195 
198  void SetMaskImage(const ImageType *);
199 
200  const ImageType * GetMaskImage() const;
201 
204  void SetInsidePixelValue(PixelType InsidePixelValue);
205 
206  itkGetConstMacro(FastCalculations, bool);
207  itkSetMacro(FastCalculations, bool);
208  itkBooleanMacro(FastCalculations);
209 
210  protected:
213  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
214 
215  void FastCompute();
216 
217  void FullCompute();
218 
220  void GenerateData() ITK_OVERRIDE;
221 
224  using Superclass::MakeOutput;
226 
227  private:
228  typename CooccurrenceMatrixFilterType::Pointer m_GLCMGenerator;
229 
230  typename TextureFeaturesFilterType::Pointer m_GLCMCalculator;
231 
232  FeatureValueVectorPointer m_FeatureMeans;
233  FeatureValueVectorPointer m_FeatureStandardDeviations;
234  FeatureNameVectorConstPointer m_RequestedFeatures;
235  OffsetVectorConstPointer m_Offsets;
236  bool m_FastCalculations;
237  };
238  } // end of namespace Statistics
239 } // end of namespace itk
240 
241 #ifndef ITK_MANUAL_INSTANTIATION
242 #include "itkEnhancedScalarImageToTextureFeaturesFilter.hxx"
243 #endif
244 
245 #endif
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::GetMaskImage
const ImageType * GetMaskImage() const
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::TextureFeatureName
short TextureFeatureName
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:149
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::EnhancedScalarImageToTextureFeaturesFilter
EnhancedScalarImageToTextureFeaturesFilter()
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::SetInsidePixelValue
void SetInsidePixelValue(PixelType InsidePixelValue)
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FullCompute
void FullCompute()
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::Self
EnhancedScalarImageToTextureFeaturesFilter Self
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:122
itkEnhancedHistogramToTextureFeaturesFilter.h
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::DataObjectPointer
DataObject::Pointer DataObjectPointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:158
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FeatureValueVectorDataObjectType
DataObjectDecorator< FeatureValueVector > FeatureValueVectorDataObjectType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:162
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::OffsetVectorPointer
OffsetVector::Pointer OffsetVectorPointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:140
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::GenerateData
void GenerateData() ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::ImageType
TImageType ImageType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:134
itk::SmartPointer< Self >
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::OffsetVector
VectorContainer< unsigned char, OffsetType > OffsetVector
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:139
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FeatureNameVectorPointer
FeatureNameVector::Pointer FeatureNameVectorPointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:152
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::SetInput
void SetInput(const ImageType *)
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::MakeOutput
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FrequencyContainerType
THistogramFrequencyContainer FrequencyContainerType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:131
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FeatureNameVectorConstPointer
FeatureNameVector::ConstPointer FeatureNameVectorConstPointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:153
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::Superclass
ProcessObject Superclass
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:123
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::GetFeatureMeansOutput
const FeatureValueVectorDataObjectType * GetFeatureMeansOutput() const
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::~EnhancedScalarImageToTextureFeaturesFilter
~EnhancedScalarImageToTextureFeaturesFilter() override
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:212
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::DataObjectPointerArraySizeType
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:223
itk::Statistics::EnhancedHistogramToTextureFeaturesFilter
This class computes texture feature coefficients from a grey level co-occurrence matrix.
Definition: itkEnhancedHistogramToTextureFeaturesFilter.h:103
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::SetPixelValueMinMax
void SetPixelValueMinMax(PixelType min, PixelType max)
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter
This class computes texture descriptions from an image.
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:118
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::GetInput
const ImageType * GetInput() const
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FastCompute
void FastCompute()
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::CooccurrenceMatrixFilterType
ScalarImageToCooccurrenceMatrixFilter< ImageType, FrequencyContainerType > CooccurrenceMatrixFilterType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:144
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::HistogramType
CooccurrenceMatrixFilterType::HistogramType HistogramType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:146
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::PixelType
ImageType::PixelType PixelType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:137
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::ImagePointer
ImageType::Pointer ImagePointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:135
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::SetNumberOfBinsPerAxis
void SetNumberOfBinsPerAxis(unsigned int)
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::SetMaskImage
void SetMaskImage(const ImageType *)
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::TextureFeaturesFilterType
EnhancedHistogramToTextureFeaturesFilter< HistogramType > TextureFeaturesFilterType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:147
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::Pointer
SmartPointer< Self > Pointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:124
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:125
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::OffsetVectorConstPointer
OffsetVector::ConstPointer OffsetVectorConstPointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:141
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::GetFeatureStandardDeviationsOutput
const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput() const
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FeatureValueVector
VectorContainer< unsigned char, double > FeatureValueVector
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:154
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::OffsetType
ImageType::OffsetType OffsetType
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:138
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FeatureValueVectorPointer
FeatureValueVector::Pointer FeatureValueVectorPointer
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:155
itk::Statistics::EnhancedScalarImageToTextureFeaturesFilter::FeatureNameVector
VectorContainer< unsigned char, TextureFeatureName > FeatureNameVector
Definition: itkEnhancedScalarImageToTextureFeaturesFilter.h:150