RTK  2.6.0
Reconstruction Toolkit
rtkSplatWithKnownWeightsImageFilter.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 rtkSplatWithKnownWeightsImageFilter_h
19 #define rtkSplatWithKnownWeightsImageFilter_h
20 
21 #include <itkInPlaceImageFilter.h>
22 #include <itkArray2D.h>
23 
25 
26 #include "rtkMacro.h"
27 
28 namespace rtk
29 {
66 template <typename VolumeSeriesType, typename VolumeType>
67 class ITK_TEMPLATE_EXPORT SplatWithKnownWeightsImageFilter
68  : public itk::InPlaceImageFilter<VolumeSeriesType, VolumeSeriesType>
69 {
70 public:
71  ITK_DISALLOW_COPY_AND_MOVE(SplatWithKnownWeightsImageFilter);
72 
77  using OutputImageRegionType = typename VolumeSeriesType::RegionType;
78 
80  itkNewMacro(Self);
81 
83 #ifdef itkOverrideGetNameOfClassMacro
84  itkOverrideGetNameOfClassMacro(SplatWithKnownWeightsImageFilter);
85 #else
87 #endif
88 
89 
91  void
92  SetInputVolumeSeries(const VolumeSeriesType * VolumeSeries);
93 
95  void
96  SetInputVolume(const VolumeType * Volume);
97 
99  itkGetMacro(Weights, itk::Array2D<float>);
102 
103  itkGetMacro(ProjectionNumber, int);
104  void
105  SetProjectionNumber(int n);
106 
107 protected:
109  ~SplatWithKnownWeightsImageFilter() override = default;
110 
111  typename VolumeSeriesType::ConstPointer
112  GetInputVolumeSeries();
113  typename VolumeType::Pointer
114  GetInputVolume();
115 
117  void
118  ThreadedGenerateData(const typename VolumeSeriesType::RegionType & outputRegionForThread,
119  itk::ThreadIdType itkNotUsed(threadId)) override;
120 
123  GetImageRegionSplitter() const override;
125 
128 };
129 } // namespace rtk
130 
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 # include "rtkSplatWithKnownWeightsImageFilter.hxx"
134 #endif
135 
136 #endif
Splats (linearly) a 3D volume into a 3D+t sequence of volumes.
#define itkSetMacro(name, type)
typename OutputImageType::RegionType OutputImageRegionType
unsigned int ThreadIdType
itk::ImageRegionSplitterDirection::Pointer m_Splitter