ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkUnwarpSequenceImageFilter.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 rtkUnwarpSequenceImageFilter_h
20#define rtkUnwarpSequenceImageFilter_h
21
26
27#ifdef RTK_USE_CUDA
30#endif
31
32namespace rtk
33{
72
73template <typename TImageSequence,
74 typename TDVFImageSequence =
75 itk::Image<itk::CovariantVector<typename TImageSequence::ValueType, TImageSequence::ImageDimension - 1>,
76 TImageSequence::ImageDimension>,
77 typename TImage = itk::Image<typename TImageSequence::ValueType, TImageSequence::ImageDimension - 1>,
78 typename TDVFImage =
79 itk::Image<itk::CovariantVector<typename TImageSequence::ValueType, TImageSequence::ImageDimension - 1>,
80 TImageSequence::ImageDimension - 1>>
81class ITK_TEMPLATE_EXPORT UnwarpSequenceImageFilter : public itk::ImageToImageFilter<TImageSequence, TImageSequence>
82{
83public:
84 ITK_DISALLOW_COPY_AND_MOVE(UnwarpSequenceImageFilter);
85
90
92 itkNewMacro(Self);
93
95 itkOverrideGetNameOfClassMacro(UnwarpSequenceImageFilter);
96
101
104#ifdef RTK_USE_CUDA
105 using ConstantSourceType = typename std::conditional_t<std::is_same_v<TImageSequence, CPUImageSequence>,
107 CudaConstantVolumeSeriesSource>;
108 using CudaConjugateGradientType = typename std::conditional_t<std::is_same_v<TImageSequence, CPUImageSequence>,
110 CudaConjugateGradientImageFilter<TImageSequence>>;
111#else
114#endif
115
117 void
118 SetDisplacementField(const TDVFImageSequence * DVFs);
119
121 typename TDVFImageSequence::Pointer
123
125 itkSetMacro(NumberOfIterations, float);
126 itkGetMacro(NumberOfIterations, float);
127
129 itkSetMacro(PhaseShift, float);
130 itkGetMacro(PhaseShift, float);
131
132 itkSetMacro(UseNearestNeighborInterpolationInWarping, bool);
133 itkGetMacro(UseNearestNeighborInterpolationInWarping, bool);
134
135 itkSetMacro(CudaConjugateGradient, bool);
136 itkGetMacro(CudaConjugateGradient, bool);
137
139 itkSetMacro(UseCudaCyclicDeformation, bool);
140 itkGetMacro(UseCudaCyclicDeformation, bool);
141
142protected:
144 ~UnwarpSequenceImageFilter() override = default;
145
147 void
148 GenerateData() override;
149
155
158
162 void
163 VerifyInputInformation() const override
164 {}
165
168 void
170 void
172
173 bool m_UseNearestNeighborInterpolationInWarping; // Default is false, linear interpolation is used instead
176
177private:
179};
180} // namespace rtk
181
182
183#ifndef ITK_MANUAL_INSTANTIATION
184# include "rtkUnwarpSequenceImageFilter.hxx"
185#endif
186
187#endif
A templated class holding a n-Dimensional covariant vector.
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition itkImage.h:89
Implements transparent reference counting.
Solves AX = B by conjugate gradient.
Generate an n-dimensional image with constant pixel values.
Implements the operator A used in the conjugate gradient unwarp sequence filter.
typename itk::Image< typename VolumeSeriesType::PixelType, VolumeSeriesType::ImageDimension > CPUImageSequence
~UnwarpSequenceImageFilter() override=default
UnwarpSequenceConjugateGradientOperator< VolumeSeriesType, DVFSequenceImageType, VolumeType, DVFImageType > CGOperatorFilterType
TDVFImageSequence::Pointer GetDisplacementField()
WarpSequenceImageFilter< VolumeSeriesType, DVFSequenceImageType, VolumeType, DVFImageType > WarpForwardFilterType
void GenerateOutputInformation() override
void SetDisplacementField(const TDVFImageSequence *DVFs)
void GenerateInputRequestedRegion() override
Applies an N-D + time Motion Vector Field to an N-D + time sequence of images.
#define itkSetMacro(name, type)