File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -364,6 +364,13 @@ class RTK_EXPORT ThreeDCircularProjectionGeometry : public ProjectionGeometry<3>
364
364
itkGetConstMacro (RadiusCylindricalDetector, double );
365
365
itkSetMacro (RadiusCylindricalDetector, double );
366
366
367
+ /* * Accessor for the internal tolerance on angles. */
368
+ itkGetConstMacro (VerifyAnglesTolerance, double );
369
+ itkSetMacro (VerifyAnglesTolerance, double );
370
+
371
+ itkGetConstMacro (FixAnglesTolerance, double );
372
+ itkSetMacro (FixAnglesTolerance, double );
373
+
367
374
protected:
368
375
ThreeDCircularProjectionGeometry ();
369
376
~ThreeDCircularProjectionGeometry () override = default ;
@@ -476,6 +483,10 @@ class RTK_EXPORT ThreeDCircularProjectionGeometry : public ProjectionGeometry<3>
476
483
std::vector<Superclass::MatrixType> m_MagnificationMatrices;
477
484
std::vector<ThreeDHomogeneousMatrixType> m_RotationMatrices;
478
485
std::vector<ThreeDHomogeneousMatrixType> m_SourceTranslationMatrices;
486
+
487
+ /* * Internal tolerance parameters. */
488
+ double m_VerifyAnglesTolerance{ 1e-4 };
489
+ double m_FixAnglesTolerance{ 1e-6 };
479
490
};
480
491
} // namespace rtk
481
492
Original file line number Diff line number Diff line change @@ -676,7 +676,6 @@ rtk::ThreeDCircularProjectionGeometry::VerifyAngles(const double outOfP
676
676
using EulerType = itk::Euler3DTransform<double >;
677
677
678
678
const Matrix3x3Type & rm = referenceMatrix; // shortcut
679
- const double EPSILON = 1e-4 ; // internal tolerance for comparison
680
679
681
680
EulerType::Pointer euler = EulerType::New ();
682
681
euler->SetComputeZYX (false ); // ZXY order
@@ -685,7 +684,7 @@ rtk::ThreeDCircularProjectionGeometry::VerifyAngles(const double outOfP
685
684
686
685
for (int i = 0 ; i < 3 ; i++) // check whether matrices match
687
686
for (int j = 0 ; j < 3 ; j++)
688
- if (itk::Math::abs (rm[i][j] - m[i][j]) > EPSILON )
687
+ if (itk::Math::abs (rm[i][j] - m[i][j]) > m_VerifyAnglesTolerance )
689
688
return false ;
690
689
691
690
return true ;
@@ -698,9 +697,8 @@ rtk::ThreeDCircularProjectionGeometry::FixAngles(double & outOfPlan
698
697
const Matrix3x3Type & referenceMatrix) const
699
698
{
700
699
const Matrix3x3Type & rm = referenceMatrix; // shortcut
701
- const double EPSILON = 1e-6 ; // internal tolerance for comparison
702
700
703
- if (itk::Math::abs (itk::Math::abs (rm[2 ][1 ]) - 1 .) > EPSILON )
701
+ if (itk::Math::abs (itk::Math::abs (rm[2 ][1 ]) - 1 .) > m_FixAnglesTolerance )
704
702
{
705
703
double oa = NAN, ga = NAN, ia = NAN;
706
704
You can’t perform that action at this time.
0 commit comments