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 #ifdef itkOverrideGetNameOfClassMacro
80  itkOverrideGetNameOfClassMacro(InterpolatorWithKnownWeightsImageFilter);
81 #else
83 #endif
84 
85 
87  void
88  SetInputVolume(const VolumeType * Volume);
89 
91  void
92  SetInputVolumeSeries(const VolumeSeriesType * VolumeSeries);
93 
95  itkGetMacro(Weights, itk::Array2D<float>);
98 
99  itkGetMacro(ProjectionNumber, int);
100  void
101  SetProjectionNumber(int n);
102 
103 protected:
105  ~InterpolatorWithKnownWeightsImageFilter() override = default;
106 
107  typename VolumeType::ConstPointer
108  GetInputVolume();
109  typename VolumeSeriesType::Pointer
110  GetInputVolumeSeries();
111 
112  void
113  GenerateInputRequestedRegion() override;
114 
116  void
117  DynamicThreadedGenerateData(const typename VolumeType::RegionType & outputRegionForThread) override;
118 
121 };
122 } // namespace rtk
123 
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 # include "rtkInterpolatorWithKnownWeightsImageFilter.hxx"
127 #endif
128 
129 #endif
#define itkSetMacro(name, type)
Interpolates (linearly) in a 3D+t sequence of volumes to get a 3D volume.