RTK  1.4.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 "rtkWin32Header.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 
32 // Forward declare class Dataset. This is done to avoid define conflicts in
33 // GDCM with lp_solve
34 namespace gdcm
35 {
36  class DataSet;
37 }
38 
39 namespace rtk
40 {
41 
55 {
56 public:
61 
65 
68 
70  itkNewMacro(Self);
71 
73  itkGetModifiableObjectMacro(Geometry, GeometryType);
74 
76  typedef std::vector<std::string> FileNamesContainer;
77 
80  void SetProjectionsFileNames (const FileNamesContainer &name)
81  {
82  if ( m_ProjectionsFileNames != name)
83  {
84  m_ProjectionsFileNames = name;
85  this->Modified();
86  }
87  }
88  const FileNamesContainer & GetProjectionsFileNames() const
89  {
90  return m_ProjectionsFileNames;
91  }
93 
94 protected:
95  std::vector<float> GetVectorTagValue(const gdcm::DataSet & ds, itk::uint16_t group, itk::uint16_t element) const;
96  std::string GetStringTagValue(const gdcm::DataSet & ds, itk::uint16_t group, itk::uint16_t element) const;
97  double GetFloatTagValue(const gdcm::DataSet & ds, itk::uint16_t group, itk::uint16_t element) const;
98 
99  BioscanGeometryReader(): m_Geometry(ITK_NULLPTR) {};
101 
102 private:
103  //purposely not implemented
104  BioscanGeometryReader(const Self&);
105  void operator=(const Self&);
106 
107  void GenerateData() ITK_OVERRIDE;
108 
109  GeometryPointer m_Geometry;
110  FileNamesContainer m_ProjectionsFileNames;
111 };
112 
113 }
114 
115 #endif // rtkBioscanGeometryReader_h
GeometryType::Pointer GeometryPointer
void SetProjectionsFileNames(const FileNamesContainer &name)
itk::LightProcessObject Superclass
itk::SmartPointer< Self > Pointer
Projection geometry for a source and a 2-D flat panel.
::uint16_t uint16_t
std::vector< std::string > FileNamesContainer
const FileNamesContainer & GetProjectionsFileNames() const
#define RTK_EXPORT
ThreeDCircularProjectionGeometry GeometryType