Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
itkEnhancedScalarImageToRunLengthFeaturesFilter.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 __itkEnhancedScalarImageToRunLengthFeaturesFilter_h
31 #define __itkEnhancedScalarImageToRunLengthFeaturesFilter_h
32 
33 #include "itkDataObjectDecorator.h"
34 
37 
38 namespace itk
39 {
40  namespace Statistics
41  {
106  template< typename TImageType,
107  typename THistogramFrequencyContainer = DenseFrequencyContainer2 >
109  {
110  public:
113  typedef ProcessObject Superclass;
116 
118  itkTypeMacro(EnhancedScalarImageToRunLengthFeaturesFilter, ProcessObject);
119 
121  itkNewMacro(Self);
122 
123  typedef THistogramFrequencyContainer FrequencyContainerType;
124  typedef TImageType ImageType;
125  typedef typename ImageType::Pointer ImagePointer;
126 
127  typedef typename ImageType::PixelType PixelType;
128  typedef typename ImageType::OffsetType OffsetType;
129  typedef VectorContainer< unsigned char, OffsetType > OffsetVector;
130  typedef typename OffsetVector::Pointer OffsetVectorPointer;
131  typedef typename OffsetVector::ConstPointer OffsetVectorConstPointer;
132 
135 
138 
141 
142  typedef short RunLengthFeatureName;
143  typedef VectorContainer<unsigned char,
145  typedef typename FeatureNameVector::Pointer FeatureNameVectorPointer;
146  typedef typename FeatureNameVector::ConstPointer FeatureNameVectorConstPointer;
147  typedef VectorContainer< unsigned char, double > FeatureValueVector;
148  typedef typename FeatureValueVector::Pointer FeatureValueVectorPointer;
149 
151  typedef DataObject::Pointer DataObjectPointer;
152 
154  typedef DataObjectDecorator< FeatureValueVector >
156 
158 
160  const;
161 
164  using Superclass::SetInput;
165  void SetInput(const ImageType *);
166 
167  const ImageType * GetInput() const;
168 
170  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
171  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
172 
174  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
175  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
176 
179  itkSetConstObjectMacro(Offsets, OffsetVector);
180  itkGetConstObjectMacro(Offsets, OffsetVector);
181 
184  void SetNumberOfBinsPerAxis(unsigned int);
185 
188  void SetPixelValueMinMax(PixelType min, PixelType max);
189 
192  void SetDistanceValueMinMax( double min, double max );
193 
196  void SetMaskImage(const ImageType *);
197 
198  const ImageType * GetMaskImage() const;
199 
202  void SetInsidePixelValue(PixelType InsidePixelValue);
203 
204  itkGetConstMacro(FastCalculations, bool);
205  itkSetMacro(FastCalculations, bool);
206  itkBooleanMacro(FastCalculations);
207  itkGetConstMacro(CombinedFeatureCalculation, bool);
208  itkSetMacro(CombinedFeatureCalculation, bool);
209  itkBooleanMacro(CombinedFeatureCalculation);
210 
211  protected:
214  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
215 
216  void FastCompute();
217 
218  void FullCompute();
219 
221  void GenerateData() ITK_OVERRIDE;
222 
225  using Superclass::MakeOutput;
227 
228  private:
229  typename RunLengthMatrixFilterType::Pointer m_RunLengthMatrixGenerator;
230 
231  FeatureValueVectorPointer m_FeatureMeans;
232  FeatureValueVectorPointer m_FeatureStandardDeviations;
233  FeatureNameVectorConstPointer m_RequestedFeatures;
234  OffsetVectorConstPointer m_Offsets;
235  bool m_FastCalculations;
236  bool m_CombinedFeatureCalculation;
237  };
238  } // end of namespace Statistics
239 } // end of namespace itk
240 
241 #ifndef ITK_MANUAL_INSTANTIATION
242 #include "itkEnhancedScalarImageToRunLengthFeaturesFilter.hxx"
243 #endif
244 
245 #endif
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::SetMaskImage
void SetMaskImage(const ImageType *)
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FrequencyContainerType
THistogramFrequencyContainer FrequencyContainerType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:121
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::MakeOutput
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::GetMaskImage
const ImageType * GetMaskImage() const
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::DataObjectPointer
DataObject::Pointer DataObjectPointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:151
itk::Statistics::EnhancedScalarImageToRunLengthMatrixFilter::HistogramType
Histogram< MeasurementType, THistogramFrequencyContainer > HistogramType
Definition: itkEnhancedScalarImageToRunLengthMatrixFilter.h:148
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::DataObjectPointerArraySizeType
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:224
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::SetPixelValueMinMax
void SetPixelValueMinMax(PixelType min, PixelType max)
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter
This class computes run length descriptions from an image.
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:108
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::SetInput
void SetInput(const ImageType *)
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::Pointer
SmartPointer< Self > Pointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:114
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FeatureValueVectorDataObjectType
DataObjectDecorator< FeatureValueVector > FeatureValueVectorDataObjectType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:155
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::Self
EnhancedScalarImageToRunLengthFeaturesFilter Self
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:112
itk::SmartPointer< Self >
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::GetInput
const ImageType * GetInput() const
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::SetInsidePixelValue
void SetInsidePixelValue(PixelType InsidePixelValue)
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::SetDistanceValueMinMax
void SetDistanceValueMinMax(double min, double max)
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::ImageType
TImageType ImageType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:124
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FeatureNameVector
VectorContainer< unsigned char, RunLengthFeatureName > FeatureNameVector
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:144
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::OffsetVectorPointer
OffsetVector::Pointer OffsetVectorPointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:130
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::OffsetVectorConstPointer
OffsetVector::ConstPointer OffsetVectorConstPointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:131
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::ImagePointer
ImageType::Pointer ImagePointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:125
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::PixelType
ImageType::PixelType PixelType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:127
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::RunLengthFeatureName
short RunLengthFeatureName
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:142
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FeatureNameVectorPointer
FeatureNameVector::Pointer FeatureNameVectorPointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:145
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FeatureValueVectorPointer
FeatureValueVector::Pointer FeatureValueVectorPointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:148
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FeatureValueVector
VectorContainer< unsigned char, double > FeatureValueVector
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:147
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::EnhancedScalarImageToRunLengthFeaturesFilter
EnhancedScalarImageToRunLengthFeaturesFilter()
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::OffsetType
ImageType::OffsetType OffsetType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:128
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::GetFeatureMeansOutput
const FeatureValueVectorDataObjectType * GetFeatureMeansOutput() const
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::RunLengthMatrixFilterType
EnhancedScalarImageToRunLengthMatrixFilter< ImageType, FrequencyContainerType > RunLengthMatrixFilterType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:134
itk::Statistics::EnhancedHistogramToRunLengthFeaturesFilter
This class computes texture feature coefficients from a grey level run-length matrix.
Definition: itkEnhancedHistogramToRunLengthFeaturesFilter.h:78
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::GetFeatureStandardDeviationsOutput
const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput() const
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::Superclass
ProcessObject Superclass
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:113
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FullCompute
void FullCompute()
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:115
itkEnhancedScalarImageToRunLengthMatrixFilter.h
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::~EnhancedScalarImageToRunLengthFeaturesFilter
~EnhancedScalarImageToRunLengthFeaturesFilter() override
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:213
itkEnhancedHistogramToRunLengthFeaturesFilter.h
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FastCompute
void FastCompute()
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::SetNumberOfBinsPerAxis
void SetNumberOfBinsPerAxis(unsigned int)
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::GenerateData
void GenerateData() ITK_OVERRIDE
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::HistogramType
RunLengthMatrixFilterType::HistogramType HistogramType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:137
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::FeatureNameVectorConstPointer
FeatureNameVector::ConstPointer FeatureNameVectorConstPointer
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:146
itk::Statistics::EnhancedScalarImageToRunLengthMatrixFilter
This class computes a run length matrix (histogram) from a given image and a mask image if provided....
Definition: itkEnhancedScalarImageToRunLengthMatrixFilter.h:117
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::OffsetVector
VectorContainer< unsigned char, OffsetType > OffsetVector
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:129
itk::Statistics::EnhancedScalarImageToRunLengthFeaturesFilter::RunLengthFeaturesFilterType
EnhancedHistogramToRunLengthFeaturesFilter< HistogramType > RunLengthFeaturesFilterType
Definition: itkEnhancedScalarImageToRunLengthFeaturesFilter.h:140