ITK  5.3.0
Insight Toolkit
itkScalarImageToRunLengthFeaturesFilter.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 itkScalarImageToRunLengthFeaturesFilter_h
19 #define itkScalarImageToRunLengthFeaturesFilter_h
20 
21 #include "itkDataObjectDecorator.h"
22 
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
95 template <typename TImageType, 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 
122 
124 
126 
127  // More work needs to be done to fix wrapping
128  // using RunLengthFeatureName = itk::Statistics::RunLengthFeatureEnum;
135 
138 
141 
143  GetFeatureMeansOutput() const;
144 
146  GetFeatureStandardDeviationsOutput() const;
147 
150  using Superclass::SetInput;
151  void
152  SetInput(const ImageType *);
153 
154  const ImageType *
155  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
176  SetNumberOfBinsPerAxis(unsigned int);
177 
180  void
181  SetPixelValueMinMax(PixelType min, PixelType max);
183 
186  void
187  SetDistanceValueMinMax(double min, double max);
189 
192  void
193  SetMaskImage(const ImageType *);
194 
195  const ImageType *
196  GetMaskImage() const;
197 
200  void
201  SetInsidePixelValue(PixelType insidePixelValue);
202 
203  itkGetConstMacro(FastCalculations, bool);
204  itkSetMacro(FastCalculations, bool);
205  itkBooleanMacro(FastCalculations);
206 
207 protected:
209  ~ScalarImageToRunLengthFeaturesFilter() override = default;
210  void
211  PrintSelf(std::ostream & os, Indent indent) const override;
212 
213  void
214  FastCompute();
215 
216  void
217  FullCompute();
218 
220  void
221  GenerateData() override;
222 
225  using Superclass::MakeOutput;
227 
228 private:
230 
236 };
237 } // end of namespace Statistics
238 } // end of namespace itk
239 
240 #ifndef ITK_MANUAL_INSTANTIATION
241 # include "itkScalarImageToRunLengthFeaturesFilter.hxx"
242 #endif
243 
244 #endif
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::m_RunLengthMatrixGenerator
RunLengthMatrixFilterType::Pointer m_RunLengthMatrixGenerator
Definition: itkScalarImageToRunLengthFeaturesFilter.h:229
itk::Statistics::ScalarImageToRunLengthMatrixFilter
This class computes a run length matrix (histogram) from a given image and a mask image if provided....
Definition: itkScalarImageToRunLengthMatrixFilter.h:107
itkScalarImageToRunLengthMatrixFilter.h
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::RunLengthFeatureName
uint8_t RunLengthFeatureName
Definition: itkScalarImageToRunLengthFeaturesFilter.h:129
itk::Statistics::HistogramToRunLengthFeaturesFilter
This class computes texture feature coefficients from a grey level run-length matrix.
Definition: itkHistogramToRunLengthFeaturesFilter.h:101
itk::Statistics::ScalarImageToRunLengthFeaturesFilter
This class computes run length descriptions from an image.
Definition: itkScalarImageToRunLengthFeaturesFilter.h:96
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::PixelType
typename ImageType::PixelType PixelType
Definition: itkScalarImageToRunLengthFeaturesFilter.h:115
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::FeatureValueVectorPointer
typename FeatureValueVector::Pointer FeatureValueVectorPointer
Definition: itkScalarImageToRunLengthFeaturesFilter.h:134
itk::DataObjectDecorator
Decorates any subclass of itkObject with a DataObject API.
Definition: itkDataObjectDecorator.h:66
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::m_RequestedFeatures
FeatureNameVectorConstPointer m_RequestedFeatures
Definition: itkScalarImageToRunLengthFeaturesFilter.h:233
itk::Statistics::Histogram
This class stores measurement vectors in the context of n-dimensional histogram.
Definition: itkHistogram.h:77
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::ImagePointer
typename ImageType::Pointer ImagePointer
Definition: itkScalarImageToRunLengthFeaturesFilter.h:113
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::OffsetType
typename ImageType::OffsetType OffsetType
Definition: itkScalarImageToRunLengthFeaturesFilter.h:116
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itkDataObjectDecorator.h
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::m_FeatureStandardDeviations
FeatureValueVectorPointer m_FeatureStandardDeviations
Definition: itkScalarImageToRunLengthFeaturesFilter.h:232
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::HistogramType
typename RunLengthMatrixFilterType::HistogramType HistogramType
Definition: itkScalarImageToRunLengthFeaturesFilter.h:123
itk::uint8_t
std::uint8_t uint8_t
Definition: itkIntTypes.h:29
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::m_FeatureMeans
FeatureValueVectorPointer m_FeatureMeans
Definition: itkScalarImageToRunLengthFeaturesFilter.h:231
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::ImageType
TImageType ImageType
Definition: itkScalarImageToRunLengthFeaturesFilter.h:112
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::m_FastCalculations
bool m_FastCalculations
Definition: itkScalarImageToRunLengthFeaturesFilter.h:235
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::FeatureNameVectorConstPointer
typename FeatureNameVector::ConstPointer FeatureNameVectorConstPointer
Definition: itkScalarImageToRunLengthFeaturesFilter.h:132
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::ScalarImageToRunLengthFeaturesFilter::FeatureNameVectorPointer
typename FeatureNameVector::Pointer FeatureNameVectorPointer
Definition: itkScalarImageToRunLengthFeaturesFilter.h:131
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::OffsetVectorConstPointer
typename OffsetVector::ConstPointer OffsetVectorConstPointer
Definition: itkScalarImageToRunLengthFeaturesFilter.h:119
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::m_Offsets
OffsetVectorConstPointer m_Offsets
Definition: itkScalarImageToRunLengthFeaturesFilter.h:234
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::FrequencyContainerType
THistogramFrequencyContainer FrequencyContainerType
Definition: itkScalarImageToRunLengthFeaturesFilter.h:111
itk::Statistics::ScalarImageToRunLengthFeaturesFilter::OffsetVectorPointer
typename OffsetVector::Pointer OffsetVectorPointer
Definition: itkScalarImageToRunLengthFeaturesFilter.h:118
itk::VectorContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Definition: itkVectorContainer.h:48
itkHistogramToRunLengthFeaturesFilter.h