00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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 }
00124
00125 #endif