ITK  5.2.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  * http://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 
21 #include "itkDataObjectDecorator.h"
22 
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
108 template <typename TImageType, typename THistogramFrequencyContainer = DenseFrequencyContainer2>
109 class ITK_TEMPLATE_EXPORT ScalarImageToTextureFeaturesFilter : public ProcessObject
110 {
111 public:
117 
120 
122  itkNewMacro(Self);
123 
124  using FrequencyContainerType = THistogramFrequencyContainer;
125  using ImageType = TImageType;
126  using ImagePointer = typename ImageType::Pointer;
127 
128  using PixelType = typename ImageType::PixelType;
129  using OffsetType = typename ImageType::OffsetType;
133 
135 
138 
139  // More work needs to be done to fix wrapping
140  // using TextureFeatureName = itk::Statistics::TextureFeatureEnum;
143 
148 
151 
154 
156  GetFeatureMeansOutput() const;
157 
159  GetFeatureStandardDeviationsOutput() const;
160 
163  using Superclass::SetInput;
164  void
165  SetInput(const ImageType *);
166 
167  const ImageType *
168  GetInput() const;
169 
171  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
172  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
174 
176  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
177  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
179 
182  itkSetConstObjectMacro(Offsets, OffsetVector);
183  itkGetConstObjectMacro(Offsets, OffsetVector);
185 
188  void
189  SetNumberOfBinsPerAxis(unsigned int);
190 
193  void
194  SetPixelValueMinMax(PixelType min, PixelType max);
196 
199  void
200  SetMaskImage(const ImageType *);
201 
202  const ImageType *
203  GetMaskImage() const;
204 
207  void
208  SetInsidePixelValue(PixelType insidePixelValue);
209 
210  itkGetConstMacro(FastCalculations, bool);
211  itkSetMacro(FastCalculations, bool);
212  itkBooleanMacro(FastCalculations);
213 
214 protected:
216  ~ScalarImageToTextureFeaturesFilter() override = default;
217  void
218  PrintSelf(std::ostream & os, Indent indent) const override;
219 
220  void
221  FastCompute();
222 
223  void
224  FullCompute();
225 
227  void
228  GenerateData() override;
229 
232  using Superclass::MakeOutput;
234 
235 private:
237 
239 
245 };
246 } // end of namespace Statistics
247 } // end of namespace itk
248 
249 #ifndef ITK_MANUAL_INSTANTIATION
250 # include "itkScalarImageToTextureFeaturesFilter.hxx"
251 #endif
252 
253 #endif
itk::uint8_t
::uint8_t uint8_t
Definition: itkIntTypes.h:29
itk::Statistics::ScalarImageToTextureFeaturesFilter::TextureFeatureName
uint8_t TextureFeatureName
Definition: itkScalarImageToTextureFeaturesFilter.h:141
itk::Statistics::ScalarImageToTextureFeaturesFilter::m_FeatureMeans
FeatureValueVectorPointer m_FeatureMeans
Definition: itkScalarImageToTextureFeaturesFilter.h:240
itk::Statistics::ScalarImageToTextureFeaturesFilter::FeatureNameVectorConstPointer
typename FeatureNameVector::ConstPointer FeatureNameVectorConstPointer
Definition: itkScalarImageToTextureFeaturesFilter.h:145
itk::Statistics::ScalarImageToTextureFeaturesFilter::FrequencyContainerType
THistogramFrequencyContainer FrequencyContainerType
Definition: itkScalarImageToTextureFeaturesFilter.h:124
itk::Statistics::ScalarImageToTextureFeaturesFilter::m_FeatureStandardDeviations
FeatureValueVectorPointer m_FeatureStandardDeviations
Definition: itkScalarImageToTextureFeaturesFilter.h:241
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Statistics::ScalarImageToTextureFeaturesFilter::OffsetVectorConstPointer
typename OffsetVector::ConstPointer OffsetVectorConstPointer
Definition: itkScalarImageToTextureFeaturesFilter.h:132
itk::Statistics::ScalarImageToTextureFeaturesFilter::m_GLCMGenerator
CooccurrenceMatrixFilterType::Pointer m_GLCMGenerator
Definition: itkScalarImageToTextureFeaturesFilter.h:236
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::Statistics::ScalarImageToTextureFeaturesFilter::m_RequestedFeatures
FeatureNameVectorConstPointer m_RequestedFeatures
Definition: itkScalarImageToTextureFeaturesFilter.h:242
itk::Statistics::ScalarImageToTextureFeaturesFilter::m_Offsets
OffsetVectorConstPointer m_Offsets
Definition: itkScalarImageToTextureFeaturesFilter.h:243
itk::DataObjectDecorator
Decorates any subclass of itkObject with a DataObject API.
Definition: itkDataObjectDecorator.h:66
itk::Statistics::ScalarImageToCooccurrenceMatrixFilter
This class computes a co-occurrence matrix (histogram) from a given image and a mask image if provide...
Definition: itkScalarImageToCooccurrenceMatrixFilter.h:94
itkScalarImageToCooccurrenceMatrixFilter.h
itk::Statistics::ScalarImageToTextureFeaturesFilter::ImagePointer
typename ImageType::Pointer ImagePointer
Definition: itkScalarImageToTextureFeaturesFilter.h:126
itk::Statistics::Histogram
This class stores measurement vectors in the context of n-dimensional histogram.
Definition: itkHistogram.h:77
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Statistics::HistogramToTextureFeaturesFilter
This class computes texture feature coefficients from a grey level co-occurrence matrix.
Definition: itkHistogramToTextureFeaturesFilter.h:133
itkDataObjectDecorator.h
itk::Statistics::ScalarImageToTextureFeaturesFilter::FeatureNameVectorPointer
typename FeatureNameVector::Pointer FeatureNameVectorPointer
Definition: itkScalarImageToTextureFeaturesFilter.h:144
itk::Statistics::ScalarImageToTextureFeaturesFilter::m_GLCMCalculator
TextureFeaturesFilterType::Pointer m_GLCMCalculator
Definition: itkScalarImageToTextureFeaturesFilter.h:238
itk::Statistics::ScalarImageToTextureFeaturesFilter::ImageType
TImageType ImageType
Definition: itkScalarImageToTextureFeaturesFilter.h:125
itk::Statistics::ScalarImageToTextureFeaturesFilter::HistogramType
typename CooccurrenceMatrixFilterType::HistogramType HistogramType
Definition: itkScalarImageToTextureFeaturesFilter.h:136
itkHistogramToTextureFeaturesFilter.h
itk::Statistics::ScalarImageToTextureFeaturesFilter::FeatureValueVectorPointer
typename FeatureValueVector::Pointer FeatureValueVectorPointer
Definition: itkScalarImageToTextureFeaturesFilter.h:147
itk::Statistics::ScalarImageToTextureFeaturesFilter::OffsetVectorPointer
typename OffsetVector::Pointer OffsetVectorPointer
Definition: itkScalarImageToTextureFeaturesFilter.h:131
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::ScalarImageToTextureFeaturesFilter::OffsetType
typename ImageType::OffsetType OffsetType
Definition: itkScalarImageToTextureFeaturesFilter.h:129
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::Statistics::ScalarImageToTextureFeaturesFilter
This class computes texture descriptions from an image.
Definition: itkScalarImageToTextureFeaturesFilter.h:109
itk::Statistics::ScalarImageToTextureFeaturesFilter::PixelType
typename ImageType::PixelType PixelType
Definition: itkScalarImageToTextureFeaturesFilter.h:128
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301
itk::Statistics::ScalarImageToTextureFeaturesFilter::m_FastCalculations
bool m_FastCalculations
Definition: itkScalarImageToTextureFeaturesFilter.h:244
itk::VectorContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Definition: itkVectorContainer.h:48