]> Creatis software - creaRigidRegistration.git/blobdiff - lib/VectorMath.h
Added PlaneReorientation (Muller project)
[creaRigidRegistration.git] / lib / VectorMath.h
index b13aea249f46d34d91e8342900015a1dba6d17b3..a16e453094da9d2b28b2dce11d520f552fad9b5c 100644 (file)
@@ -8,15 +8,41 @@ class VectorMath{
 public: 
        VectorMath();
     ~VectorMath();
+
+       /*Sets all the vector points*/
        void SetData(std::vector<int> pointsX1, std::vector<int> pointsX2, std::vector<int> pointsY1, std::vector<int> pointsY2, std::vector<int> pointsZ1, std::vector<int> pointsZ2);
+       
+       /*Runs the calculations*/
        void Run();
-       /*
-    int[3]* GetPoints();
-       double[3]* GetScales();
-       double GetAngle();*/
-private:
-       //float[3] _points;
+       
+       /*Returns the origin of the second vector*/
+       std::vector<int> GetOrigin();
+
+       /*Returns the origin of the first vector*/
+       std::vector<int> 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;
@@ -32,7 +58,20 @@ private:
        int _pointz2a;
        int _pointz2b;
 
-       vtkMath *_math;
+       //////////////////
+       /* Results   */
+       /////////////////
+       
+       std::vector<int> _origin;
+       std::vector<int> _originReslicer;
+       double _result[3];
+       
+       double _scaleX;
+       double _scaleY;
+       double _scaleZ;
+
+       double _angle;  
 };
 
-#endif
\ No newline at end of file
+#endif
+