ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkCyclicDeformationImageFilter.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 rtkCyclicDeformationImageFilter_h
20#define rtkCyclicDeformationImageFilter_h
21
23
24#include "rtkConfiguration.h"
25#include "rtkMacro.h"
26
27namespace rtk
28{
29
49template <class TInputImage, class TOutputImage>
50class ITK_TEMPLATE_EXPORT CyclicDeformationImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(CyclicDeformationImageFilter);
54
57 using InputImageType = TInputImage;
58 using OutputImageType = TOutputImage;
62 using OutputImageRegionType = typename OutputImageType::RegionType;
63
65 itkNewMacro(Self);
66
68 itkOverrideGetNameOfClassMacro(CyclicDeformationImageFilter);
69
72 itkGetMacro(SignalFilename, std::string);
73 virtual void
74 SetSignalFilename(std::string _arg);
75 virtual void
76 SetSignalVector(std::vector<double> _arg);
77
80 itkGetMacro(Frame, unsigned int);
81 itkSetMacro(Frame, unsigned int);
82
83protected:
85 ~CyclicDeformationImageFilter() override = default;
86
87 void
89 void
91 void
93 void
94 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
95
96 // Linear interpolation position and weights
97 unsigned int m_FrameInf{};
98 unsigned int m_FrameSup{};
99 double m_WeightInf{};
100 double m_WeightSup{};
101
102private:
103 unsigned int m_Frame{ 0 };
104
105 std::string m_SignalFilename;
106 std::vector<double> m_Signal;
107};
108
109} // end namespace rtk
110
111#ifndef ITK_MANUAL_INSTANTIATION
112# include "rtkCyclicDeformationImageFilter.hxx"
113#endif
114
115#endif
Base class for filters that take an image as input and produce an image as output.
Implements transparent reference counting.
virtual void SetSignalVector(std::vector< double > _arg)
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
~CyclicDeformationImageFilter() override=default
void GenerateInputRequestedRegion() override
virtual void SetSignalFilename(std::string _arg)
typename OutputImageType::RegionType OutputImageRegionType
void GenerateOutputInformation() override
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
void BeforeThreadedGenerateData() override
#define itkSetMacro(name, type)