ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkScalarImageToTextureFeaturesFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
104 template< typename TImageType,
105  typename THistogramFrequencyContainer = DenseFrequencyContainer2 >
106 class ITK_TEMPLATE_EXPORT ScalarImageToTextureFeaturesFilter:public ProcessObject
107 {
108 public:
114 
117 
119  itkNewMacro(Self);
120 
121  using FrequencyContainerType = THistogramFrequencyContainer;
122  using ImageType = TImageType;
123  using ImagePointer = typename ImageType::Pointer;
124 
125  using PixelType = typename ImageType::PixelType;
126  using OffsetType = typename ImageType::OffsetType;
130 
133 
136 
137  using TextureFeatureName = short;
139 
144 
147 
150 
151  const FeatureValueVectorDataObjectType * GetFeatureMeansOutput() const;
152 
153  const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput() const;
154 
157  using Superclass::SetInput;
158  void SetInput(const ImageType *);
159 
160  const ImageType * GetInput() const;
161 
163  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
164  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
166 
168  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
169  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
171 
174  itkSetConstObjectMacro(Offsets, OffsetVector);
175  itkGetConstObjectMacro(Offsets, OffsetVector);
177 
180  void SetNumberOfBinsPerAxis(unsigned int);
181 
184  void SetPixelValueMinMax(PixelType min, PixelType max);
186 
189  void SetMaskImage(const ImageType *);
190 
191  const ImageType * GetMaskImage() const;
192 
195  void SetInsidePixelValue(PixelType InsidePixelValue);
196 
197  itkGetConstMacro(FastCalculations, bool);
198  itkSetMacro(FastCalculations, bool);
199  itkBooleanMacro(FastCalculations);
200 
201 protected:
203  ~ScalarImageToTextureFeaturesFilter() override = default;
204  void PrintSelf(std::ostream & os, Indent indent) const override;
205 
206  void FastCompute();
207 
208  void FullCompute();
209 
211  void GenerateData() override;
212 
215  using Superclass::MakeOutput;
217 
218 private:
220 
222 
228 };
229 } // end of namespace Statistics
230 } // end of namespace itk
231 
232 #ifndef ITK_MANUAL_INSTANTIATION
233 #include "itkScalarImageToTextureFeaturesFilter.hxx"
234 #endif
235 
236 #endif
This class computes a co-occurence matrix (histogram) from a given image and a mask image if provided...
Light weight base class for most itk classes.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
This class stores measurement vectors in the context of n-dimensional histogram.
Definition: itkHistogram.h:77
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
This class computes texture descriptions from an image.
typename CooccurrenceMatrixFilterType::HistogramType HistogramType
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
This class computes texture feature coefficients from a grey level co-occurrence matrix.
Decorates any subclass of itkObject with a DataObject API.
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
SmartPointer< Self > Pointer