ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkScalarImageToRunLengthMatrixFilter.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 * https://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 itkScalarImageToRunLengthMatrixFilter_h
19#define itkScalarImageToRunLengthMatrixFilter_h
20
21#include "itkImage.h"
22#include "itkHistogram.h"
23#include "itkNumericTraits.h"
24#include "itkVectorContainer.h"
25#include "itkProcessObject.h"
26
27namespace itk
28{
29namespace Statistics
30{
31
94
95template <typename TImageType, typename THistogramFrequencyContainer = DenseFrequencyContainer2>
96class ITK_TEMPLATE_EXPORT ScalarImageToRunLengthMatrixFilter : public ProcessObject
97{
98public:
104
106 itkOverrideGetNameOfClassMacro(ScalarImageToRunLengthMatrixFilter);
107
109 itkNewMacro(Self);
110
111 using ImageType = TImageType;
112 using ImagePointer = typename ImageType::Pointer;
113 using ImageConstPointer = typename ImageType::ConstPointer;
114 using PixelType = typename ImageType::PixelType;
115 using IndexType = typename ImageType::IndexType;
116 using RegionType = typename ImageType::RegionType;
117 using RadiusType = typename ImageType::SizeType;
118 using OffsetType = typename ImageType::OffsetType;
121 using PointType = typename ImageType::PointType;
122
125
130
132 static constexpr unsigned int ImageDimension = TImageType::ImageDimension;
133
135 static constexpr unsigned int DefaultBinsPerAxis = 256;
136
146 itkSetObjectMacro(Offsets, OffsetVector);
147
157 void
158 SetOffset(const OffsetType offset);
159
163 itkGetModifiableObjectMacro(Offsets, OffsetVector);
164
166 itkSetMacro(NumberOfBinsPerAxis, unsigned int);
167
169 itkGetConstMacro(NumberOfBinsPerAxis, unsigned int);
170
175 void
177
179 itkGetConstMacro(Min, PixelType);
180
182 itkGetConstMacro(Max, PixelType);
183
188 void
190
194 itkGetConstMacro(MinDistance, RealType);
195
199 itkGetConstMacro(MaxDistance, RealType);
200
203 void
204 SetInput(const ImageType * image);
205
207 const ImageType *
208 GetInput() const;
209
211 void
212 SetMaskImage(const ImageType * image);
213
215 const ImageType *
217
219 const HistogramType *
220 GetOutput() const;
221
226 itkSetMacro(InsidePixelValue, PixelType);
227 itkGetConstMacro(InsidePixelValue, PixelType);
229
230protected:
233 void
234 PrintSelf(std::ostream & os, Indent indent) const override;
235
238
243
245 void
246 GenerateData() override;
247
255 void
257
258private:
259 unsigned int m_NumberOfBinsPerAxis{};
265
269};
270} // end of namespace Statistics
271} // end of namespace itk
272
273#ifndef ITK_MANUAL_INSTANTIATION
274# include "itkScalarImageToRunLengthMatrixFilter.hxx"
275#endif
276
277#endif
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition itkIndent.h:50
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
Implements transparent reference counting.
This class stores measurement vectors in the context of n-dimensional histogram.
SmartPointer< const Self > ConstPointer
ArrayType MeasurementVectorType
Definition itkSample.h:77
SmartPointer< Self > Pointer
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
void PrintSelf(std::ostream &os, Indent indent) const override
void SetDistanceValueMinMax(RealType min, RealType max)
void SetPixelValueMinMax(PixelType min, PixelType max)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
detail::VectorContainer< std::conditional_t< std::is_void_v< T2 >, SizeValueType, T1 >, std::conditional_t< std::is_void_v< T2 >, T1, T2 > > VectorContainer