RTK  2.6.0
Reconstruction Toolkit
rtkInterpolatorWithKnownWeightsImageFilter.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 #ifndef rtkInterpolatorWithKnownWeightsImageFilter_h
19 #define rtkInterpolatorWithKnownWeightsImageFilter_h
20 
21 #include "itkInPlaceImageFilter.h"
22 #include "itkArray2D.h"
23 #include "rtkConfiguration.h"
24 #include "rtkMacro.h"
25 
26 namespace rtk
27 {
63 template <typename VolumeType, typename VolumeSeriesType>
64 class ITK_TEMPLATE_EXPORT InterpolatorWithKnownWeightsImageFilter
65  : public itk::InPlaceImageFilter<VolumeType, VolumeType>
66 {
67 public:
68  ITK_DISALLOW_COPY_AND_MOVE(InterpolatorWithKnownWeightsImageFilter);
69 
74 
76  itkNewMacro(Self);
77 
79  itkOverrideGetNameOfClassMacro(InterpolatorWithKnownWeightsImageFilter);
80 
82  void
83  SetInputVolume(const VolumeType * Volume);
84 
86  void
87  SetInputVolumeSeries(const VolumeSeriesType * VolumeSeries);
88 
90  itkGetMacro(Weights, itk::Array2D<float>);
93 
94  itkGetMacro(ProjectionNumber, int);
95  void
96  SetProjectionNumber(int n);
97 
98 protected:
100  ~InterpolatorWithKnownWeightsImageFilter() override = default;
101 
102  typename VolumeType::ConstPointer
103  GetInputVolume();
104  typename VolumeSeriesType::Pointer
105  GetInputVolumeSeries();
106 
107  void
108  GenerateInputRequestedRegion() override;
109 
111  void
112  DynamicThreadedGenerateData(const typename VolumeType::RegionType & outputRegionForThread) override;
113 
116 };
117 } // namespace rtk
118 
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 # include "rtkInterpolatorWithKnownWeightsImageFilter.hxx"
122 #endif
123 
124 #endif
#define itkSetMacro(name, type)
Interpolates (linearly) in a 3D+t sequence of volumes to get a 3D volume.