RTK  2.0.1
Reconstruction Toolkit
rtkPhaseReader.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 rtkPhaseReader_h
19 #define rtkPhaseReader_h
20 
21 #include <itkCSVFileReaderBase.h>
22 
23 namespace rtk
24 {
25 
34 class ITK_EXPORT PhaseReader:public itk::CSVFileReaderBase
35 {
36 public:
37  ITK_DISALLOW_COPY_AND_ASSIGN(PhaseReader);
38 
40  using Self = PhaseReader;
44 
46  itkNewMacro(Self)
47 
48 
49  itkTypeMacro(Self,Superclass)
50 
52  using ValueType = float;
53 
56  void Parse() override;
57 
60  virtual void Update();
61 
64  virtual std::vector<float> GetOutput();
65 
66 protected:
67 
68  PhaseReader();
69  ~PhaseReader () override = default;
70 
72  void PrintSelf(std::ostream & os, itk::Indent indent) const override;
73 
74 private:
75 
76  std::vector<float> m_Phases;
77 };
78 
79 } //end namespace rtk
80 
81 #ifndef ITK_MANUAL_INSTANTIATION
82 #include "rtkPhaseReader.hxx"
83 #endif
84 
85 #endif
STL namespace.
Parses csv file containing the cardiac or respiratory phases of each projection.