ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkDownsampleImageFilter.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 rtkDownsampleImageFilter_h
20#define rtkDownsampleImageFilter_h
21
23
24namespace rtk
25{
26
37template <class TInputImage, class TOutputImage = TInputImage>
38class ITK_TEMPLATE_EXPORT DownsampleImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
39{
40public:
41 ITK_DISALLOW_COPY_AND_MOVE(DownsampleImageFilter);
42
48
50 itkNewMacro(Self);
51
53 itkOverrideGetNameOfClassMacro(DownsampleImageFilter);
54
56 using OutputImageType = TOutputImage;
57 using InputImageType = TInputImage;
58 using OutputImagePointer = typename OutputImageType::Pointer;
59 using InputImagePointer = typename InputImageType::Pointer;
60 using InputImageConstPointer = typename InputImageType::ConstPointer;
61
63 using OutputImageRegionType = typename TOutputImage::RegionType;
64
66 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
67
70 void
71 SetFactors(const unsigned int factors[]);
72
75 void
76 SetFactor(unsigned int dimension, unsigned int factor);
77
85 void
87
93 void
95
96protected:
98 ~DownsampleImageFilter() override = default;
99
110 void
111 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
112
113private:
116};
117
118
119} // end namespace rtk
120
121#ifndef rtk_MANUAL_INSTANTIATION
122# include "rtkDownsampleImageFilter.hxx"
123#endif
124
125#endif
Base class for filters that take an image as input and produce an image as output.
Implements transparent reference counting.
void SetFactors(const unsigned int factors[])
void GenerateOutputInformation() override
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
void SetFactor(unsigned int dimension, unsigned int factor)
typename OutputImageType::Pointer OutputImagePointer
typename InputImageType::RegionType OutputImageRegionType
void GenerateInputRequestedRegion() override
~DownsampleImageFilter() override=default
itk::ImageToImageFilter< InputImageType, InputImageType > Superclass
typename InputImageType::ConstPointer InputImageConstPointer