RTK  2.0.1
Reconstruction Toolkit
rtkPhasesToInterpolationWeights.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 
19 #ifndef rtkPhasesToInterpolationWeights_h
20 #define rtkPhasesToInterpolationWeights_h
21 
22 #include "itkCSVFileReaderBase.h"
23 #include "itkArray2D.h"
24 
25 namespace rtk
26 {
27 
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_ASSIGN(PhasesToInterpolationWeights);
42 
48 
50  itkNewMacro(Self)
51 
52 
53  itkTypeMacro(Self,Superclass)
54 
56  using Array2DType = itk::Array2D<float>;
57 
59  using ValueType = float;
60 
63  // itkGetModifiableObjectMacro(Array2D,Array2DType);
64 
67  void Parse() override;
68 
71  virtual void Update();
72 
75  virtual Array2DType GetOutput();
76 
78  itkSetMacro(UnevenTemporalSpacing, bool)
79  itkGetMacro(UnevenTemporalSpacing, bool)
80 
82  itkSetMacro(NumberOfReconstructedFrames, int)
83  itkGetMacro(NumberOfReconstructedFrames, int)
84 
86  void SetSelectedProjections(std::vector<bool> sprojs);
87  itkGetMacro(SelectedProjections, std::vector<bool>)
88 
89 protected:
90 
92  ~PhasesToInterpolationWeights () override = default;
93 
95  void PrintSelf(std::ostream & os, itk::Indent indent) const override;
96 
97 private:
98 
99  Array2DType m_Array2D;
100  int m_NumberOfReconstructedFrames;
101  bool m_UnevenTemporalSpacing;
102  std::vector<bool> m_SelectedProjections;
103 };
104 
105 } //end namespace rtk
106 
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "rtkPhasesToInterpolationWeights.hxx"
109 #endif
110 
111 #endif
STL namespace.
Parses csv file containing the cardiac or respiratory phases of each projection, and generates interp...
#define itkSetMacro(name, type)