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::Statistics
28{
29
92
93template <typename TImageType, typename THistogramFrequencyContainer = DenseFrequencyContainer2>
94class ITK_TEMPLATE_EXPORT ScalarImageToRunLengthMatrixFilter : public ProcessObject
95{
96public:
102
104 itkOverrideGetNameOfClassMacro(ScalarImageToRunLengthMatrixFilter);
105
107 itkNewMacro(Self);
108
109 using ImageType = TImageType;
110 using ImagePointer = typename ImageType::Pointer;
111 using ImageConstPointer = typename ImageType::ConstPointer;
112 using PixelType = typename ImageType::PixelType;
113 using IndexType = typename ImageType::IndexType;
114 using RegionType = typename ImageType::RegionType;
115 using RadiusType = typename ImageType::SizeType;
116 using OffsetType = typename ImageType::OffsetType;
119 using PointType = typename ImageType::PointType;
120
123
128
130 static constexpr unsigned int ImageDimension = TImageType::ImageDimension;
131
133 static constexpr unsigned int DefaultBinsPerAxis = 256;
134
144 itkSetObjectMacro(Offsets, OffsetVector);
145
155 void
156 SetOffset(const OffsetType offset);
157
161 itkGetModifiableObjectMacro(Offsets, OffsetVector);
162
164 itkSetMacro(NumberOfBinsPerAxis, unsigned int);
165
167 itkGetConstMacro(NumberOfBinsPerAxis, unsigned int);
168
173 void
175
177 itkGetConstMacro(Min, PixelType);
178
180 itkGetConstMacro(Max, PixelType);
181
186 void
188
192 itkGetConstMacro(MinDistance, RealType);
193
197 itkGetConstMacro(MaxDistance, RealType);
198
201 void
202 SetInput(const ImageType * image);
203
205 const ImageType *
206 GetInput() const;
207
209 void
210 SetMaskImage(const ImageType * image);
211
213 const ImageType *
215
217 const HistogramType *
218 GetOutput() const;
219
225 itkSetMacro(InsidePixelValue, PixelType);
226 itkGetConstMacro(InsidePixelValue, PixelType);
228protected:
231 void
232 PrintSelf(std::ostream & os, Indent indent) const override;
233
236
241
243 void
244 GenerateData() override;
245
253 void
255
256private:
257 unsigned int m_NumberOfBinsPerAxis{};
263
267};
268} // namespace itk::Statistics
269
270#ifndef ITK_MANUAL_INSTANTIATION
271# include "itkScalarImageToRunLengthMatrixFilter.hxx"
272#endif
273
274#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:75
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)
detail::VectorContainer< std::conditional_t< std::is_void_v< T2 >, SizeValueType, T1 >, std::conditional_t< std::is_void_v< T2 >, T1, T2 > > VectorContainer