X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FVectorMath.h;h=a16e453094da9d2b28b2dce11d520f552fad9b5c;hb=0c0807563f54ac3149d9bd23815c4ddacbc5b223;hp=9eafe8bf22c7e05b7f824637b28e86fd6112fdcd;hpb=205d50ce100b70ad4cd986edbea3a79247cc165c;p=creaRigidRegistration.git diff --git a/lib/VectorMath.h b/lib/VectorMath.h index 9eafe8b..a16e453 100644 --- a/lib/VectorMath.h +++ b/lib/VectorMath.h @@ -8,17 +8,41 @@ class VectorMath{ public: VectorMath(); ~VectorMath(); + + /*Sets all the vector points*/ void SetData(std::vector pointsX1, std::vector pointsX2, std::vector pointsY1, std::vector pointsY2, std::vector pointsZ1, std::vector pointsZ2); + + /*Runs the calculations*/ void Run(); + + /*Returns the origin of the second vector*/ std::vector GetOrigin(); + + /*Returns the origin of the first vector*/ std::vector GetOriginReslicer(); + + /*Returns the cross product of the two vectors*/ void GetResult(double result[3]); + + /*Rotation angle (dot product)*/ double GetAngle(); + + /*Scale in X*/ double GetScaleX(); + + /*Scale in Y*/ double GetScaleY(); + + /*Scale in Z*/ double GetScaleZ(); private: + /////////////////// + /* Vector Points */ + /////////////////// + + /*The points are defined by the following naming pattern: _point[axis(x,y or z)][vector(1 {first image} or 2{second image})][a{starting piont} or b{end point}]*/ + int _pointx1a; int _pointx1b; int _pointx2a; @@ -33,6 +57,10 @@ private: int _pointz1b; int _pointz2a; int _pointz2b; + + ////////////////// + /* Results */ + ///////////////// std::vector _origin; std::vector _originReslicer;