ITK  6.0.0
Insight Toolkit
itkFFTImageFilterFactory.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
19#ifndef itkFFTImageFilterFactory_h
20#define itkFFTImageFilterFactory_h
21
22#include "itkImage.h"
24#include "itkVersion.h"
25
26namespace itk
27{
28
41template <template <typename, typename> class TFFTImageFilter>
43{};
44
45
86template <template <typename, typename> class TFFTImageFilter,
87 template <typename, unsigned int> class TInput = Image,
88 template <typename, unsigned int> class TOutput = Image>
90{
91public:
92 ITK_DISALLOW_COPY_AND_MOVE(FFTImageFilterFactory);
93
98
100 const char *
101 GetITKSourceVersion() const override
102 {
103 return ITK_SOURCE_VERSION;
104 }
105 const char *
106 GetDescription() const override
107 {
108 return "An FFTImageFilter factory";
109 }
113 itkFactorylessNewMacro(Self);
114
116 itkOverrideGetNameOfClassMacro(FFTImageFilterFactory);
117
119 static void
121 {
123
125 }
126
127protected:
132 template <typename InputPixelType, typename OutputPixelType, unsigned int D, unsigned int... ImageDimensions>
133 void
134 OverrideFFTImageFilterType(const std::integer_sequence<unsigned int, D, ImageDimensions...> &)
135 {
136 using InputImageType = TInput<InputPixelType, D>;
137 using OutputImageType = TOutput<OutputPixelType, D>;
139 typeid(TFFTImageFilter<InputImageType, OutputImageType>).name(),
140 "FFT Image Filter Override",
141 true,
142 CreateObjectFunction<TFFTImageFilter<InputImageType, OutputImageType>>::New());
143 OverrideFFTImageFilterType<InputPixelType, OutputPixelType>(
144 std::integer_sequence<unsigned int, ImageDimensions...>{});
145 }
146 template <typename InputPixelType, typename OutputPixelType>
147 void
148 OverrideFFTImageFilterType(const std::integer_sequence<unsigned int> &)
149 {}
153 {
154 OverrideFFTImageFilterType<typename FFTImageFilterTraits<TFFTImageFilter>::template InputPixelType<float>,
155 typename FFTImageFilterTraits<TFFTImageFilter>::template OutputPixelType<float>>(
157
158 OverrideFFTImageFilterType<typename FFTImageFilterTraits<TFFTImageFilter>::template InputPixelType<double>,
159 typename FFTImageFilterTraits<TFFTImageFilter>::template OutputPixelType<double>>(
161 }
162};
163
164} // namespace itk
165
166#endif // itkFFTImageFilterFactory_h
Used to create callback functions that create ITK Objects for use with the itk::ObjectFactory.
Object factory implementation for FFT filters.
const char * GetITKSourceVersion() const override
const char * GetDescription() const override
void OverrideFFTImageFilterType(const std::integer_sequence< unsigned int > &)
void OverrideFFTImageFilterType(const std::integer_sequence< unsigned int, D, ImageDimensions... > &)
Templated n-dimensional image class.
Definition: itkImage.h:89
Light weight base class for most itk classes.
Create instances of classes using an object factory.
void RegisterOverride(const char *classOverride, const char *subclass, const char *description, bool enableFlag, CreateObjectFunctionBase *createFunction)
static void RegisterFactoryInternal(ObjectFactoryBase *)
BinaryGeneratorImageFilter< TInputImage1, TInputImage2, TOutputImage > Superclass
#define ITK_SOURCE_VERSION
Definition: itkVersion.h:39
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Helper defining pixel traits for templated FFT image filters.