RTK  1.4.0
Reconstruction Toolkit
rtkUnwarpSequenceConjugateGradientOperator.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  * http://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 rtkUnwarpSequenceConjugateGradientOperator_h
20 #define rtkUnwarpSequenceConjugateGradientOperator_h
21 
24 
25 namespace rtk
26 {
27 
59  template< typename TImageSequence,
60  typename TDVFImageSequence = itk::Image< itk::CovariantVector < typename TImageSequence::ValueType,
61  TImageSequence::ImageDimension-1 >,
62  TImageSequence::ImageDimension >,
63  typename TImage = itk::Image< typename TImageSequence::ValueType,
64  TImageSequence::ImageDimension-1 >,
65  typename TDVFImage = itk::Image<itk::CovariantVector < typename TImageSequence::ValueType,
66  TImageSequence::ImageDimension - 1 >,
67  TImageSequence::ImageDimension - 1> >
69 {
70 public:
75 
77  itkNewMacro(Self)
78 
79 
80  itkTypeMacro(rtkUnwarpSequenceConjugateGradientOperator, ConjugateGradientOperator)
81 
82  typedef rtk::WarpSequenceImageFilter<TImageSequence, TDVFImageSequence, TImage, TDVFImage> WarpSequenceFilterType;
83 
85  void SetDisplacementField(const TDVFImageSequence* DVFs);
86 
88  typename TDVFImageSequence::Pointer GetDisplacementField();
89 
91  itkSetMacro(PhaseShift, float)
92  itkGetMacro(PhaseShift, float)
93 
94  itkSetMacro(UseNearestNeighborInterpolationInWarping, bool)
95  itkGetMacro(UseNearestNeighborInterpolationInWarping, bool)
96 
98  itkSetMacro(UseCudaCyclicDeformation, bool)
99  itkGetMacro(UseCudaCyclicDeformation, bool)
100 
101 protected:
103  virtual ~UnwarpSequenceConjugateGradientOperator() ITK_OVERRIDE {}
104 
106  void GenerateData() ITK_OVERRIDE;
107 
111 
113  bool m_UseNearestNeighborInterpolationInWarping; //Default is false, linear interpolation is used instead
114 
118  void VerifyInputInformation() ITK_OVERRIDE {}
119 
122  void GenerateInputRequestedRegion() ITK_OVERRIDE;
123  void GenerateOutputInformation() ITK_OVERRIDE;
125 
127 
128 private:
129  UnwarpSequenceConjugateGradientOperator(const Self &); //purposely not implemented
130  void operator=(const Self &); //purposely not implemented
131 
132 };
133 } //namespace RTK
134 
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "rtkUnwarpSequenceConjugateGradientOperator.hxx"
138 #endif
139 
140 #endif
Implements the operator A used in the conjugate gradient unwarp sequence filter.
Applies an N-D + time Motion Vector Field to an N-D + time sequence of images.
TDVFImageSequence::Pointer GetDisplacementField()
#define itkSetMacro(name, type)
void SetDisplacementField(const TDVFImageSequence *DVFs)