ITK  5.0.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  using FrequencyContainerType = THistogramFrequencyContainer;
112  using ImageType = TImageType;
113  using ImagePointer = typename ImageType::Pointer;
114 
115  using PixelType = typename ImageType::PixelType;
116  using OffsetType = typename ImageType::OffsetType;
120 
123 
125 
127 
128  using RunLengthFeatureName = short;
129  using FeatureNameVector = VectorContainer<unsigned char,
135 
138 
141 
142  const FeatureValueVectorDataObjectType * GetFeatureMeansOutput() const;
143 
144  const FeatureValueVectorDataObjectType * GetFeatureStandardDeviationsOutput()
145  const;
146 
149  using Superclass::SetInput;
150  void SetInput(const ImageType *);
151 
152  const ImageType * GetInput() const;
153 
155  itkGetConstReferenceObjectMacro(FeatureMeans, FeatureValueVector);
156  itkGetConstReferenceObjectMacro(FeatureStandardDeviations, FeatureValueVector);
158 
160  itkSetConstObjectMacro(RequestedFeatures, FeatureNameVector);
161  itkGetConstObjectMacro(RequestedFeatures, FeatureNameVector);
163 
166  itkSetConstObjectMacro(Offsets, OffsetVector);
167  itkGetConstObjectMacro(Offsets, OffsetVector);
169 
172  void SetNumberOfBinsPerAxis(unsigned int);
173 
176  void SetPixelValueMinMax(PixelType min, PixelType max);
178 
181  void SetDistanceValueMinMax( double min, double max );
183 
186  void SetMaskImage(const ImageType *);
187 
188  const ImageType * GetMaskImage() const;
189 
192  void SetInsidePixelValue(PixelType InsidePixelValue);
193 
194  itkGetConstMacro(FastCalculations, bool);
195  itkSetMacro(FastCalculations, bool);
196  itkBooleanMacro(FastCalculations);
197 
198 protected:
200  ~ScalarImageToRunLengthFeaturesFilter() override = default;
201  void PrintSelf( std::ostream & os, Indent indent ) const override;
202 
203  void FastCompute();
204 
205  void FullCompute();
206 
208  void GenerateData() override;
209 
212  using Superclass::MakeOutput;
214 
215 private:
217 
223 };
224 } // end of namespace Statistics
225 } // end of namespace itk
226 
227 #ifndef ITK_MANUAL_INSTANTIATION
228 #include "itkScalarImageToRunLengthFeaturesFilter.hxx"
229 #endif
230 
231 #endif
Light weight base class for most itk classes.
This class computes texture feature coefficients from a grey level run-length matrix.
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...
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
This class computes a run length matrix (histogram) from a given image and a mask image if provided...
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
This class computes run length descriptions from an image.