RTK  2.1.0
Reconstruction Toolkit
rtkBioscanGeometryReader.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 rtkBioscanGeometryReader_h
20 #define rtkBioscanGeometryReader_h
21 
22 #include <itkLightProcessObject.h>
24 #include "RTKExport.h"
25 
26 // Trick KWStyle with a first declaration of namespace RTK. Style test would
27 // not pass otherwise on the gdcm namespace.
28 namespace rtk
29 {}
30 
31 // Forward declare class Dataset. This is done to avoid define conflicts in
32 // GDCM with lp_solve
33 namespace gdcm
34 {
35 class DataSet;
36 }
37 
38 namespace rtk
39 {
40 
53 {
54 public:
55 #if ITK_VERSION_MAJOR == 5 && ITK_VERSION_MINOR == 1
56  ITK_DISALLOW_COPY_AND_ASSIGN(BioscanGeometryReader);
57 #else
58  ITK_DISALLOW_COPY_AND_MOVE(BioscanGeometryReader);
59 #endif
60 
65 
69 
72 
74  itkNewMacro(Self);
75 
77  itkGetModifiableObjectMacro(Geometry, GeometryType);
78 
80  using FileNamesContainer = std::vector<std::string>;
81 
84  void
86  {
87  if (m_ProjectionsFileNames != name)
88  {
89  m_ProjectionsFileNames = name;
90  this->Modified();
91  }
92  }
93  const FileNamesContainer &
95  {
96  return m_ProjectionsFileNames;
97  }
99 
100 protected:
101  std::vector<float>
102  GetVectorTagValue(const gdcm::DataSet & ds, itk::uint16_t group, itk::uint16_t element) const;
103  std::string
104  GetStringTagValue(const gdcm::DataSet & ds, itk::uint16_t group, itk::uint16_t element) const;
105  double
106  GetFloatTagValue(const gdcm::DataSet & ds, itk::uint16_t group, itk::uint16_t element) const;
107 
109  : m_Geometry(nullptr){};
110  ~BioscanGeometryReader() override = default;
111 
112 private:
113  void
114  GenerateData() override;
115 
118 };
119 
120 } // namespace rtk
121 
122 #endif // rtkBioscanGeometryReader_h
void SetProjectionsFileNames(const FileNamesContainer &name)
Projection geometry for a source and a 2-D flat panel.
::uint16_t uint16_t
std::vector< std::string > FileNamesContainer
const FileNamesContainer & GetProjectionsFileNames() const