19 #ifndef rtkThreeDCircularProjectionGeometry_h 20 #define rtkThreeDCircularProjectionGeometry_h 22 #include "RTKExport.h" 76 AddProjection(
const double sid,
78 const double gantryAngle,
79 const double projOffsetX = 0.,
80 const double projOffsetY = 0.,
81 const double outOfPlaneAngle = 0.,
82 const double inPlaneAngle = 0.,
83 const double sourceOffsetX = 0.,
84 const double sourceOffsetY = 0.);
88 AddProjectionInRadians(
const double sid,
90 const double gantryAngle,
91 const double projOffsetX = 0.,
92 const double projOffsetY = 0.,
93 const double outOfPlaneAngle = 0.,
94 const double inPlaneAngle = 0.,
95 const double sourceOffsetX = 0.,
96 const double sourceOffsetY = 0.);
109 AddProjection(
const PointType & sourcePosition,
154 const std::vector<double> &
157 return this->m_GantryAngles;
159 const std::vector<double> &
162 return this->m_OutOfPlaneAngles;
164 const std::vector<double> &
167 return this->m_InPlaneAngles;
169 const std::vector<double> &
172 return this->m_SourceToIsocenterDistances;
174 const std::vector<double> &
177 return this->m_SourceOffsetsX;
179 const std::vector<double> &
182 return this->m_SourceOffsetsY;
184 const std::vector<double> &
187 return this->m_SourceToDetectorDistances;
189 const std::vector<double> &
192 return this->m_ProjectionOffsetsX;
194 const std::vector<double> &
197 return this->m_ProjectionOffsetsY;
204 const std::vector<double> &
207 return this->m_SourceAngles;
212 const std::vector<double>
213 GetTiltAngles()
const;
217 const std::multimap<double, unsigned int>
218 GetSortedAngles(
const std::vector<double> & angles)
const;
222 const std::map<double, unsigned int>
223 GetUniqueSortedAngles(
const std::vector<double> & angles)
const;
226 const std::vector<double>
227 GetAngularGapsWithNext(
const std::vector<double> & angles)
const;
231 const std::vector<double>
232 GetAngularGaps(
const std::vector<double> & angles);
236 static ThreeDHomogeneousMatrixType
237 ComputeRotationHomogeneousMatrix(
double angleX,
double angleY,
double angleZ);
240 static TwoDHomogeneousMatrixType
241 ComputeTranslationHomogeneousMatrix(
double transX,
double transY);
242 static ThreeDHomogeneousMatrixType
243 ComputeTranslationHomogeneousMatrix(
double transX,
double transY,
double transZ);
248 static Superclass::MatrixType
249 ComputeProjectionMagnificationMatrix(
double sdd,
double sid);
253 const std::vector<TwoDHomogeneousMatrixType> &
256 return this->m_ProjectionTranslationMatrices;
258 TwoDHomogeneousMatrixType
261 return this->m_ProjectionTranslationMatrices[i];
265 const std::vector<ThreeDHomogeneousMatrixType> &
268 return this->m_RotationMatrices;
270 ThreeDHomogeneousMatrixType
273 return this->m_RotationMatrices[i];
276 const std::vector<ThreeDHomogeneousMatrixType> &
279 return this->m_SourceTranslationMatrices;
281 ThreeDHomogeneousMatrixType
284 return this->m_SourceTranslationMatrices[i];
287 const std::vector<Superclass::MatrixType> &
290 return this->m_MagnificationMatrices;
292 Superclass::MatrixType
295 return this->m_MagnificationMatrices[i];
299 const std::vector<double> &
302 return this->m_CollimationUInf;
304 const std::vector<double> &
307 return this->m_CollimationUSup;
309 const std::vector<double> &
312 return this->m_CollimationVInf;
314 const std::vector<double> &
317 return this->m_CollimationVSup;
324 SetCollimationOfLastProjection(
const double uinf,
const double usup,
const double vinf,
const double vsup);
328 const HomogeneousVectorType
329 GetSourcePosition(
const unsigned int i)
const;
336 const ThreeDHomogeneousMatrixType
337 GetProjectionCoordinatesToDetectorSystemMatrix(
const unsigned int i)
const;
344 const ThreeDHomogeneousMatrixType
345 GetProjectionCoordinatesToFixedSystemMatrix(
const unsigned int i)
const;
349 ConvertAngleBetween0And360Degrees(
const double a);
353 ConvertAngleBetween0And2PIRadians(
const double a);
357 ConvertAngleBetweenMinusAndPlusPIRadians(
const double a);
364 ToUntiltedCoordinateAtIsocenter(
const unsigned int noProj,
const double tiltedCoord)
const;
368 itkGetConstMacro(RadiusCylindricalDetector,
double);
373 itkGetConstMacro(VerifyAnglesTolerance,
double);
377 itkGetConstMacro(FixAnglesTolerance,
double);
387 this->m_ProjectionTranslationMatrices.push_back(m);
393 this->m_RotationMatrices.push_back(m);
399 this->m_SourceTranslationMatrices.push_back(m);
405 this->m_MagnificationMatrices.push_back(m);
426 VerifyAngles(
const double outOfPlaneAngleRAD,
427 const double gantryAngleRAD,
428 const double inPlaneAngleRAD,
429 const Matrix3x3Type & referenceMatrix)
const;
451 FixAngles(
double & outOfPlaneAngleRAD,
452 double & gantryAngleRAD,
453 double & inPlaneAngleRAD,
454 const Matrix3x3Type & referenceMatrix)
const;
459 InternalClone()
const override;
475 double m_RadiusCylindricalDetector{ 0. };
496 double m_VerifyAnglesTolerance{ 1e-4 };
497 double m_FixAnglesTolerance{ 1e-6 };
502 #endif // __rtkThreeDCircularProjectionGeometry_h
std::vector< ThreeDHomogeneousMatrixType > m_SourceTranslationMatrices
const std::vector< double > & GetSourceAngles() const
virtual void AddProjectionTranslationMatrix(const TwoDHomogeneousMatrixType &m)
const std::vector< double > & GetSourceOffsetsY() const
std::vector< double > m_CollimationUInf
ThreeDHomogeneousMatrixType GetRotationMatrix(const unsigned int i) const
Superclass::MatrixType GetMagnificationMatrices(const unsigned int i) const
const std::vector< ThreeDHomogeneousMatrixType > & GetSourceTranslationMatrices() const
const std::vector< double > & GetInPlaneAngles() const
std::vector< ThreeDHomogeneousMatrixType > m_RotationMatrices
virtual void AddMagnificationMatrix(const Superclass::MatrixType &m)
Projection geometry for a source and a 2-D flat panel.
std::vector< double > m_ProjectionOffsetsY
const std::vector< double > & GetGantryAngles() const
#define itkSetMacro(name, type)
virtual void AddRotationMatrix(const ThreeDHomogeneousMatrixType &m)
const std::vector< ThreeDHomogeneousMatrixType > & GetRotationMatrices() const
const std::vector< TwoDHomogeneousMatrixType > & GetProjectionTranslationMatrices() const
A templated class holding a vector of M x (M+1) matrices.
std::vector< double > m_SourceToDetectorDistances
const std::vector< double > & GetSourceToIsocenterDistances() const
const std::vector< double > & GetProjectionOffsetsY() const
TwoDHomogeneousMatrixType GetProjectionTranslationMatrix(const unsigned int i) const
std::vector< double > m_CollimationVSup
const std::vector< double > & GetProjectionOffsetsX() const
std::vector< double > m_CollimationVInf
virtual void AddSourceTranslationMatrix(const ThreeDHomogeneousMatrixType &m)
std::vector< double > m_SourceOffsetsY
ThreeDHomogeneousMatrixType GetSourceTranslationMatrices(const unsigned int i) const
std::vector< double > m_SourceAngles
std::vector< double > m_CollimationUSup
std::vector< TwoDHomogeneousMatrixType > m_ProjectionTranslationMatrices
const std::vector< Superclass::MatrixType > & GetMagnificationMatrices() const
std::vector< double > m_SourceToIsocenterDistances
const std::vector< double > & GetSourceOffsetsX() const
const std::vector< double > & GetCollimationUInf() const
const std::vector< double > & GetSourceToDetectorDistances() const
const std::vector< double > & GetOutOfPlaneAngles() const
const std::vector< double > & GetCollimationVInf() const
std::vector< double > m_SourceOffsetsX
const std::vector< double > & GetCollimationVSup() const
const std::vector< double > & GetCollimationUSup() const
std::vector< double > m_OutOfPlaneAngles
std::vector< double > m_InPlaneAngles
std::vector< Superclass::MatrixType > m_MagnificationMatrices
std::vector< double > m_GantryAngles
std::vector< double > m_ProjectionOffsetsX
Superclass::MatrixType HomogeneousProjectionMatrixType