ITK  6.0.0
Insight Toolkit
itkScalarImageToTextureFeaturesFilter.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 itkScalarImageToTextureFeaturesFilter_h
19#define itkScalarImageToTextureFeaturesFilter_h
20
22
25
26namespace itk
27{
28namespace Statistics
29{
108template <typename TImageType,
109 typename THistogramFrequencyContainer = DenseFrequencyContainer2,
110 typename TMaskImageType = TImageType>
111class ITK_TEMPLATE_EXPORT ScalarImageToTextureFeaturesFilter : public ProcessObject
112{
113public:
119
121 itkOverrideGetNameOfClassMacro(ScalarImageToTextureFeaturesFilter);
122
124 itkNewMacro(Self);
125
126 using FrequencyContainerType = THistogramFrequencyContainer;
127 using ImageType = TImageType;
129 using MaskImageType = TMaskImageType;
131 using MaskPixelType = typename MaskImageType::PixelType;
132
133 using PixelType = typename ImageType::PixelType;
134 using OffsetType = typename ImageType::OffsetType;
138
141
144
145 // More work needs to be done to fix wrapping
146 // using TextureFeatureName = itk::Statistics::TextureFeatureEnum;
147 using TextureFeatureName = uint8_t;
149
154
157
160
163
166
169 using Superclass::SetInput;
170 void
172
173 const ImageType *
174 GetInput() const;
175
177 itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
178 itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
182 itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
183 itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
188 itkSetConstObjectMacro(Offsets, OffsetVector);
189 itkGetConstObjectMacro(Offsets, OffsetVector);
194 void
196
199 void
205 void
207
208 const MaskImageType *
210
213 void
215
216 itkGetConstMacro(FastCalculations, bool);
217 itkSetMacro(FastCalculations, bool);
218 itkBooleanMacro(FastCalculations);
219
220protected:
223 void
224 PrintSelf(std::ostream & os, Indent indent) const override;
225
226 void
228
229 void
231
233 void
234 GenerateData() override;
235
238 using Superclass::MakeOutput;
240
241private:
242 typename CooccurrenceMatrixFilterType::Pointer m_GLCMGenerator{};
243
244 typename TextureFeaturesFilterType::Pointer m_GLCMCalculator{};
245
247 FeatureValueVectorPointer m_FeatureStandardDeviations{};
248 FeatureNameVectorConstPointer m_RequestedFeatures{};
250 bool m_FastCalculations{};
251};
252} // end of namespace Statistics
253} // end of namespace itk
254
255#ifndef ITK_MANUAL_INSTANTIATION
256# include "itkScalarImageToTextureFeaturesFilter.hxx"
257#endif
258
259#endif
Decorates any subclass of itkObject with a DataObject API.
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
This class computes texture feature coefficients from a grey level co-occurrence matrix.
This class stores measurement vectors in the context of n-dimensional histogram.
Definition: itkHistogram.h:78
This class computes a co-occurrence matrix (histogram) from a given image and a mask image if provide...
This class computes texture descriptions from an image.
void SetPixelValueMinMax(PixelType min, PixelType max)
const FeatureValueVectorDataObjectType * GetFeatureMeansOutput() const
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override
Make a DataObject of the correct type to used as the specified output.
void PrintSelf(std::ostream &os, Indent indent) const override
const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput() const
void SetInsidePixelValue(MaskPixelType insidePixelValue)
typename CooccurrenceMatrixFilterType::HistogramType HistogramType
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41