ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkScalarImageToRunLengthFeaturesFilter.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 itkScalarImageToRunLengthFeaturesFilter_h
19 #define itkScalarImageToRunLengthFeaturesFilter_h
20 
21 #include "itkDataObjectDecorator.h"
22 
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
94 template< typename TImageType,
95  typename THistogramFrequencyContainer = DenseFrequencyContainer2 >
96 class ITK_TEMPLATE_EXPORT ScalarImageToRunLengthFeaturesFilter:public ProcessObject
97 {
98 public:
104 
107 
109  itkNewMacro(Self);
110 
111  typedef THistogramFrequencyContainer FrequencyContainerType;
112  typedef TImageType ImageType;
113  typedef typename ImageType::Pointer ImagePointer;
114 
115  typedef typename ImageType::PixelType PixelType;
116  typedef typename ImageType::OffsetType OffsetType;
120 
123 
126 
129 
130  typedef short RunLengthFeatureName;
131  typedef VectorContainer<unsigned char,
137 
140 
144 
145  const FeatureValueVectorDataObjectType * GetFeatureMeansOutput() const;
146 
147  const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput()
148  const;
149 
152  using Superclass::SetInput;
153  void SetInput(const ImageType *);
154 
155  const ImageType * GetInput() const;
156 
158  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
159  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
161 
163  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
164  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
166 
169  itkSetConstObjectMacro(Offsets, OffsetVector);
170  itkGetConstObjectMacro(Offsets, OffsetVector);
172 
175  void SetNumberOfBinsPerAxis(unsigned int);
176 
179  void SetPixelValueMinMax(PixelType min, PixelType max);
181 
184  void SetDistanceValueMinMax( double min, double 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  virtual ~ScalarImageToRunLengthFeaturesFilter() ITK_OVERRIDE {}
204  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
205 
206  void FastCompute();
207 
208  void FullCompute();
209 
211  virtual void GenerateData() ITK_OVERRIDE;
212 
215  using Superclass::MakeOutput;
216  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE;
217 
218 private:
219  typename RunLengthMatrixFilterType::Pointer m_RunLengthMatrixGenerator;
220 
222  FeatureValueVectorPointer m_FeatureStandardDeviations;
223  FeatureNameVectorConstPointer m_RequestedFeatures;
225  bool m_FastCalculations;
226 };
227 } // end of namespace Statistics
228 } // end of namespace itk
229 
230 #ifndef ITK_MANUAL_INSTANTIATION
231 #include "itkScalarImageToRunLengthFeaturesFilter.hxx"
232 #endif
233 
234 #endif
Light weight base class for most itk classes.
This class computes texture feature coefficients from a grey level run-length matrix.
ScalarImageToRunLengthMatrixFilter< ImageType, FrequencyContainerType > RunLengthMatrixFilterType
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...
HistogramToRunLengthFeaturesFilter< HistogramType > RunLengthFeaturesFilterType
This class computes a run length matrix (histogram) from a given image and a mask image if provided...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Decorates any subclass of itkObject with a DataObject API.
VectorContainer< unsigned char, RunLengthFeatureName > FeatureNameVector
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
This class computes run length descriptions from an image.