ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkSingularValueThresholdImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright RTK 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 * 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
19#ifndef rtkSingularValueThresholdImageFilter_h
20#define rtkSingularValueThresholdImageFilter_h
21
23#include <itkVector.h>
24
26
27namespace rtk
28{
49template <typename TInputImage, typename TRealType = float, typename TOutputImage = TInputImage>
50class ITK_TEMPLATE_EXPORT SingularValueThresholdImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(SingularValueThresholdImageFilter);
54
60
62 itkNewMacro(Self);
63
65 itkOverrideGetNameOfClassMacro(SingularValueThresholdImageFilter);
66
69 using OutputPixelType = typename TOutputImage::PixelType;
70 using InputPixelType = typename TInputImage::PixelType;
71
73 using InputImageType = TInputImage;
74 using OutputImageType = TOutputImage;
75 using InputImagePointer = typename InputImageType::Pointer;
76 using OutputImagePointer = typename OutputImageType::Pointer;
77
79 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
80
82 static constexpr unsigned int VectorDimension = InputPixelType::Dimension;
83
85 using RealType = TRealType;
88
91
94 itkConceptMacro(RealTypeHasNumericTraitsCheck, (itk::Concept::HasNumericTraits<RealType>));
96
97 itkGetMacro(Threshold, TRealType);
98 itkSetMacro(Threshold, TRealType);
99
100protected:
103
104 void
105 ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadId) override;
106
108 [[nodiscard]] const itk::ImageRegionSplitterBase *
109 GetImageRegionSplitter() const override;
111
112private:
113 TRealType m_Threshold;
114};
115} // namespace rtk
116
117#ifndef ITK_MANUAL_INSTANTIATION
118# include "rtkSingularValueThresholdImageFilter.hxx"
119#endif
120
121#endif
Divide an image region into several pieces.
Base class for filters that take an image as input and produce an image as output.
typename OutputImageType::RegionType OutputImageRegionType
Templated n-dimensional image class.
Definition itkImage.h:89
Base class for filters that take an image as input and overwrite that image as the output.
Implements transparent reference counting.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
const itk::ImageRegionSplitterBase * GetImageRegionSplitter() const override
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
itk::Vector< TRealType, InputPixelType::Dimension > RealVectorType
typename Superclass::OutputImageRegionType OutputImageRegionType
~SingularValueThresholdImageFilter() override=default
itk::Image< RealVectorType, TInputImage::ImageDimension > RealVectorImageType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) override
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
unsigned int ThreadIdType
Definition itkIntTypes.h:98
#define itkSetMacro(name, type)