RTK  2.0.1
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  * 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 #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 InterpolatorWithKnownWeightsImageFilter : public itk::InPlaceImageFilter< VolumeType, VolumeType >
65 {
66 public:
67  ITK_DISALLOW_COPY_AND_ASSIGN(InterpolatorWithKnownWeightsImageFilter);
68 
73 
75  itkNewMacro(Self)
76 
77 
79 
81  void SetInputVolume(const VolumeType* Volume);
82 
84  void SetInputVolumeSeries(const VolumeSeriesType* VolumeSeries);
85 
87  itkGetMacro(Weights, itk::Array2D<float>)
88  itkSetMacro(Weights, itk::Array2D<float>)
89 
90  itkGetMacro(ProjectionNumber, int)
91  void SetProjectionNumber(int n);
92 
93 protected:
94  InterpolatorWithKnownWeightsImageFilter();
95  ~InterpolatorWithKnownWeightsImageFilter() override = default;
96 
97  typename VolumeType::ConstPointer GetInputVolume();
98  typename VolumeSeriesType::Pointer GetInputVolumeSeries();
99 
100  void GenerateInputRequestedRegion() override;
101 
103 #if ITK_VERSION_MAJOR<5
104  void ThreadedGenerateData( const typename VolumeType::RegionType& outputRegionForThread, ThreadIdType threadId ) override;
105 #else
106  void DynamicThreadedGenerateData( const typename VolumeType::RegionType& outputRegionForThread) override;
107 #endif
108 
109 
112 
113 };
114 } //namespace ITK
115 
116 
117 #ifndef ITK_MANUAL_INSTANTIATION
118 #include "rtkInterpolatorWithKnownWeightsImageFilter.hxx"
119 #endif
120 
121 #endif
VolumeSeriesType::Pointer GetInputVolumeSeries()
unsigned int ThreadIdType
Interpolates (linearly) in a 3D+t sequence of volumes to get a 3D volume.
void ThreadedGenerateData(const typename VolumeType::RegionType &outputRegionForThread, ThreadIdType threadId) override
void SetInputVolumeSeries(const VolumeSeriesType *VolumeSeries)
VolumeType::ConstPointer GetInputVolume()
void SetInputVolume(const VolumeType *Volume)
#define itkSetMacro(name, type)