]> Creatis software - gdcm.git/blob - src/gdcmOrientation.h
add std::string Orientation::GetOrientation ( File *f ) method, that
[gdcm.git] / src / gdcmOrientation.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmOrientation.h,v $
5   Language:  C++
6   Date:      $Date: 2005/09/21 16:39:53 $
7   Version:   $Revision: 1.7 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMORIENTATION_H
20 #define GDCMORIENTATION_H
21
22 #include "gdcmBase.h"
23 #include <map>
24
25 namespace gdcm 
26 {
27 typedef struct
28 {
29    double x;
30    double y;
31    double z;
32 } vector3D;
33
34 typedef std::pair<double, double> Res;
35 class File;
36
37 //-----------------------------------------------------------------------------
38 /**
39  * \brief Orientation class for dealing with DICOM image orientation
40  */
41 class GDCM_EXPORT Orientation : public Base
42 {
43 public:
44   Orientation() {}
45   ~Orientation() {}
46
47   double TypeOrientation( File *file );
48   std::string GetOrientation ( File *file );  
49   
50 private:
51    Res VerfCriterion(int typeCriterion, double criterionNew, Res const &res);
52    double CalculLikelyhood2Vec(vector3D const &refA, vector3D const &refB, 
53                                vector3D const &ori1, vector3D const &ori2);
54    vector3D ProductVectorial(vector3D const &vec1, vector3D const &vec2);
55    std::string GetSingleOrientation ( float *iop);
56 };
57 } // end namespace gdcm
58 //-----------------------------------------------------------------------------
59 #endif