Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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: 2005/11/28 16:31:23 $
00007   Version:   $Revision: 1.17 $
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 
00024 #include <map>
00025 
00026 namespace gdcm 
00027 {
00028 typedef struct
00029 {
00030    double x;
00031    double y;
00032    double z;
00033 } vector3D;
00034 
00035 typedef std::pair<double, double> Res;
00036 class File;
00037 
00038 typedef enum {
00039    NotApplicable = 0,
00040    Axial = 1,
00041    AxialInvert = -1,
00042    Coronal = 2,
00043    CoronalInvert = -2,
00044    Sagital = 3,
00045    SagitalInvert = -3,
00046    HeartAxial = 4,
00047    HeartAxialInvert = -4,
00048    HeartCoronal = 5,
00049    HeartCoronalInvert = -5,
00050    HeartSagital = 6,
00051    HeartSagitalInvert = -6
00052 } OrientationType;
00053 
00054 //-----------------------------------------------------------------------------
00099 class GDCM_EXPORT Orientation : public RefCounter
00100 {
00101    gdcmTypeMacro(Orientation);
00102 public:
00104    static Orientation *New() {return new Orientation();}
00105 
00106   OrientationType GetOrientationType( File *file );
00107   std::string GetOrientation ( File *file );  
00108   
00109   static const char* GetOrientationTypeString(OrientationType const o);
00110   
00111 protected:
00113   Orientation() {}
00115   ~Orientation() {}
00116 private:
00117    Res VerfCriterion(int typeCriterion, double criterionNew, Res const &res);
00118    double CalculLikelyhood2Vec(vector3D const &refA, vector3D const &refB, 
00119                                vector3D const &ori1, vector3D const &ori2);
00120    vector3D ProductVectorial(vector3D const &vec1, vector3D const &vec2);
00121    std::string GetSingleOrientation ( float *iop);
00122 };
00123 } // end namespace gdcm
00124 //-----------------------------------------------------------------------------
00125 #endif

Generated on Fri Jan 20 10:14:25 2006 for gdcm by  doxygen 1.4.4