ITK  4.9.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 >
107 {
108 public:
114 
117 
119  itkNewMacro(Self);
120 
121  typedef THistogramFrequencyContainer FrequencyContainerType;
122  typedef TImageType ImageType;
123  typedef typename ImageType::Pointer ImagePointer;
124 
125  typedef typename ImageType::PixelType PixelType;
126  typedef typename ImageType::OffsetType OffsetType;
130 
133 
136 
137  typedef short TextureFeatureName;
139 
144 
147 
151 
153 
155 
158  using Superclass::SetInput;
159  void SetInput(const ImageType *);
160 
161  const ImageType * GetInput() const;
162 
164  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
165  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
167 
169  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
170  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
172 
175  itkSetConstObjectMacro(Offsets, OffsetVector);
176  itkGetConstObjectMacro(Offsets, OffsetVector);
178 
181  void SetNumberOfBinsPerAxis(unsigned int);
182 
185  void SetPixelValueMinMax(PixelType min, PixelType max);
187 
190  void SetMaskImage(const ImageType *);
191 
192  const ImageType * GetMaskImage() const;
193 
196  void SetInsidePixelValue(PixelType InsidePixelValue);
197 
198  itkGetConstMacro(FastCalculations, bool);
199  itkSetMacro(FastCalculations, bool);
200  itkBooleanMacro(FastCalculations);
201 
202 protected:
205  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
206 
207  void FastCompute();
208 
209  void FullCompute();
210 
212  virtual void GenerateData() ITK_OVERRIDE;
213 
216  using Superclass::MakeOutput;
217  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE;
218 
219 private:
221 
223 
229 };
230 } // end of namespace Statistics
231 } // end of namespace itk
232 
233 #ifndef ITK_MANUAL_INSTANTIATION
234 #include "itkScalarImageToTextureFeaturesFilter.hxx"
235 #endif
236 
237 #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.
ScalarImageToCooccurrenceMatrixFilter< ImageType, FrequencyContainerType > CooccurrenceMatrixFilterType
const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput() const
void SetInsidePixelValue(PixelType InsidePixelValue)
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.
DataObjectDecorator< FeatureValueVector > FeatureValueVectorDataObjectType
This class computes texture feature coefficients from a grey level co-occurrence matrix.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Decorates any subclass of itkObject with a DataObject API.
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
HistogramToTextureFeaturesFilter< HistogramType > TextureFeaturesFilterType
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
void SetPixelValueMinMax(PixelType min, PixelType max)
const FeatureValueVectorDataObjectType * GetFeatureMeansOutput() const
VectorContainer< unsigned char, TextureFeatureName > FeatureNameVector
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) override
Make a DataObject of the correct type to used as the specified output.