RTK  1.4.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  * 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:
71 
73  itkNewMacro(Self)
74 
75 
77 
79  void SetInputVolume(const VolumeType* Volume);
80 
82  void SetInputVolumeSeries(const VolumeSeriesType* VolumeSeries);
83 
85  itkGetMacro(Weights, itk::Array2D<float>)
86  itkSetMacro(Weights, itk::Array2D<float>)
87 
88  itkGetMacro(ProjectionNumber, int)
89  void SetProjectionNumber(int n);
90 
91 protected:
92  InterpolatorWithKnownWeightsImageFilter();
93  virtual ~InterpolatorWithKnownWeightsImageFilter() ITK_OVERRIDE {}
94 
95  typename VolumeType::ConstPointer GetInputVolume();
96  typename VolumeSeriesType::Pointer GetInputVolumeSeries();
97 
98  void GenerateInputRequestedRegion() ITK_OVERRIDE;
99 
101 #if ITK_VERSION_MAJOR<5
102  void ThreadedGenerateData( const typename VolumeType::RegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE;
103 #else
104  void DynamicThreadedGenerateData( const typename VolumeType::RegionType& outputRegionForThread) ITK_OVERRIDE;
105 #endif
106 
107 
110 
111 private:
112  InterpolatorWithKnownWeightsImageFilter(const Self &); //purposely not implemented
113  void operator=(const Self &); //purposely not implemented
114 
115 
116 };
117 } //namespace ITK
118 
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 #include "rtkInterpolatorWithKnownWeightsImageFilter.hxx"
122 #endif
123 
124 #endif
itk::ImageToImageFilter< VolumeType, VolumeType > Superclass
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)