Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
itkEnhancedScalarImageToNeighbourhoodGreyLevelDifferenceFeaturesFilter.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 itkEnhancedScalarImageToNeighbourhoodGreyLevelDifferenceFeaturesFilter_h
31 #define itkEnhancedScalarImageToNeighbourhoodGreyLevelDifferenceFeaturesFilter_h
32 
33 #include <itkDataObjectDecorator.h>
34 
37 
38 namespace itk
39 {
40  namespace Statistics
41  {
105  template< typename TImageType,
106  typename THistogramFrequencyContainer = DenseFrequencyContainer2 >
108  {
109  public:
112  typedef ProcessObject Superclass;
115 
118 
120  itkNewMacro(Self);
121 
122  typedef THistogramFrequencyContainer FrequencyContainerType;
123  typedef TImageType ImageType;
124  typedef typename ImageType::Pointer ImagePointer;
125 
126  typedef typename ImageType::PixelType PixelType;
127  typedef typename ImageType::OffsetType OffsetType;
128  typedef VectorContainer< unsigned char, OffsetType > OffsetVector;
129  typedef typename OffsetVector::Pointer OffsetVectorPointer;
130  typedef typename OffsetVector::ConstPointer OffsetVectorConstPointer;
131 
134 
137 
140 
142  typedef VectorContainer<unsigned char,
144  typedef typename FeatureNameVector::Pointer FeatureNameVectorPointer;
145  typedef typename FeatureNameVector::ConstPointer FeatureNameVectorConstPointer;
146  typedef VectorContainer< unsigned char, double > FeatureValueVector;
147  typedef typename FeatureValueVector::Pointer FeatureValueVectorPointer;
148 
150  typedef DataObject::Pointer DataObjectPointer;
151 
153  typedef DataObjectDecorator< FeatureValueVector >
155 
157 
159  const;
160 
163  using Superclass::SetInput;
164  void SetInput(const ImageType *);
165 
166  const ImageType * GetInput() const;
167 
169  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
170  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
171 
173  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
174  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
175 
178  itkSetConstObjectMacro(Offsets, OffsetVector);
179  itkGetConstObjectMacro(Offsets, OffsetVector);
180 
183  void SetNumberOfBinsPerAxis(unsigned int);
184 
188 
191  void SetDistanceValueMinMax( double min, double max );
192 
195  void SetMaskImage(const ImageType *);
196 
197  const ImageType * GetMaskImage() const;
198 
201  void SetInsidePixelValue(PixelType InsidePixelValue);
202 
203  itkGetConstMacro(FastCalculations, bool);
204  itkSetMacro(FastCalculations, bool);
205  itkBooleanMacro(FastCalculations);
206 
207  protected:
210  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
211 
212  void FastCompute();
213 
214  void FullCompute();
215 
217  void GenerateData() ITK_OVERRIDE;
218 
221  using Superclass::MakeOutput;
223 
224  private:
225  typename NeighbourhoodGreyLevelDifferenceMatrixFilterType::Pointer m_NeighbourhoodGreyLevelDifferenceMatrixGenerator;
226 
227  FeatureValueVectorPointer m_FeatureMeans;
228  FeatureValueVectorPointer m_FeatureStandardDeviations;
229  FeatureNameVectorConstPointer m_RequestedFeatures;
230  OffsetVectorConstPointer m_Offsets;
231  bool m_FastCalculations;
232  };
233  } // end of namespace Statistics
234 } // end of namespace itk
235 
236 #ifndef ITK_MANUAL_INSTANTIATION
237 #include <itkEnhancedScalarImageToNeighbourhoodGreyLevelDifferenceFeaturesFilter.tpp>
238 #endif
239 
240 #endif
EnhancedHistogramToNeighbourhoodGreyLevelDifferenceFeaturesFilter< HistogramType > NeighbourhoodGreyLevelDifferenceFeaturesFilterType
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE
EnhancedScalarImageToNeighbourhoodGreyLevelDifferenceMatrixFilter< ImageType, FrequencyContainerType > NeighbourhoodGreyLevelDifferenceMatrixFilterType
const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput() const
This class computes a run length matrix (histogram) from a given image and a mask image if provided....