RTK  1.4.0
Reconstruction Toolkit
rtkForbildPhantomFileReader.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 rtkForbildPhantomFileReader_h
20 #define rtkForbildPhantomFileReader_h
21 
22 #include <itkLightProcessObject.h>
23 #include "rtkGeometricPhantom.h"
24 
25 namespace rtk
26 {
27 
43 {
44 public:
50 
52  itkStaticConstMacro(Dimension, unsigned int, ConvexShape::Dimension);
59 
61  itkNewMacro(Self);
62 
65 
67  itkGetModifiableObjectMacro(GeometricPhantom, GeometricPhantom);
68  itkSetObjectMacro(GeometricPhantom, GeometricPhantom);
70 
72  itkGetStringMacro(Filename);
73  itkSetStringMacro(Filename);
75 
77  virtual void GenerateOutputInformation();
78 
79 protected:
82 
85 
86  void CreateForbildSphere(const std::string &s);
87  void CreateForbildBox(const std::string &s);
88  void CreateForbildCylinder(const std::string &s, const std::string &fig);
89  void CreateForbildElliptCyl(const std::string &s, const std::string &fig);
90  void CreateForbildEllipsoid(const std::string &s, const std::string &fig);
91  void CreateForbildCone(const std::string &s, const std::string &fig);
92  void CreateForbildTetrahedron(const std::string &s);
93  RotationMatrixType ComputeRotationMatrixBetweenVectors(const VectorType& source, const VectorType & dest) const;
94 
95  bool FindParameterInString(const std::string &name,const std::string &s, ScalarType & param);
96  bool FindVectorInString(const std::string &name,const std::string &s, VectorType & vec);
97  void FindClipPlanes(const std::string &s);
98  void FindUnions(const std::string &s);
99 
100 private:
101  ForbildPhantomFileReader( const Self& ); //purposely not implemented
102  void operator=( const Self& ); //purposely not implemented
103 
104  GeometricPhantomPointer m_GeometricPhantom;
105  std::string m_Filename;
106  PointType m_Center;
108  ConvexShapeVectorType m_Unions;
109 };
110 
111 } // end namespace rtk
112 
113 #endif
Container for a geometric phantom, i.e., a set of ConvexShapes.
std::vector< ConvexShapePointer > ConvexShapeVector
GeometricPhantom::Pointer GeometricPhantomPointer
itk::SmartPointer< const Self > ConstPointer
#define RTK_EXPORT
ConvexShape::RotationMatrixType RotationMatrixType
static const unsigned int Dimension
GeometricPhantom::ConvexShapeVector ConvexShapeVectorType
Reads GeometricPhantom from a Forbild file.