gdcmOrientation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmOrientation.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/08/22 16:14:04 $
00007   Version:   $Revision: 1.20 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #ifndef _GDCMORIENTATION_H_
00020 #define _GDCMORIENTATION_H_
00021 
00022 #include "gdcmRefCounter.h"
00023 #include <map>
00024 
00025 namespace GDCM_NAME_SPACE 
00026 {
00027 typedef struct
00028 {
00029    double x;
00030    double y;
00031    double z;
00032 } vector3D;
00033 
00034 typedef std::pair<double, double> Res;
00035 class File;
00036 
00037 typedef enum {
00038    NotApplicable = 0,
00039    Axial = 1,
00040    AxialInvert = -1,
00041    Coronal = 2,
00042    CoronalInvert = -2,
00043    Sagital = 3,
00044    SagitalInvert = -3,
00045    HeartAxial = 4,
00046    HeartAxialInvert = -4,
00047    HeartCoronal = 5,
00048    HeartCoronalInvert = -5,
00049    HeartSagital = 6,
00050    HeartSagitalInvert = -6
00051 } OrientationType;
00052 
00053 //-----------------------------------------------------------------------------
00098 class GDCM_EXPORT Orientation : public RefCounter
00099 {
00100    gdcmTypeMacro(Orientation);
00101 public:
00103    static Orientation *New() {return new Orientation();}
00104 
00105   OrientationType GetOrientationType( File *file );
00106   std::string GetOrientation ( File *file );  
00107   
00108   static const char* GetOrientationTypeString(OrientationType const o);
00109 
00110 protected:
00112   Orientation() {}
00114   ~Orientation() {}
00115 private:
00116    Res VerfCriterion(int typeCriterion, double criterionNew, Res const &res);
00117    double CalculLikelyhood2Vec(vector3D const &refA, vector3D const &refB, 
00118                                vector3D const &ori1, vector3D const &ori2);
00119    vector3D ProductVectorial(vector3D const &vec1, vector3D const &vec2);
00120    std::string GetSingleOrientation ( float *iop);
00121 };
00122 } // end namespace gdcm
00123 //-----------------------------------------------------------------------------
00124 #endif

Generated on Fri Aug 24 12:59:31 2007 for gdcm by  doxygen 1.4.6