gdcmOrientation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program: GDCM (Grassroots DICOM). A DICOM library
00004   Module:  $URL$
00005 
00006   Copyright (c) 2006-2010 Mathieu Malaterre
00007   All rights reserved.
00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 #ifndef GDCMORIENTATION_H
00016 #define GDCMORIENTATION_H
00017 
00018 #include "gdcmTypes.h"
00019 
00020 namespace gdcm
00021 {
00022   
00026 class GDCM_EXPORT Orientation
00027 {
00028   friend std::ostream& operator<<(std::ostream &_os, const Orientation &o);
00029 public:
00030   Orientation();
00031   ~Orientation();
00032 
00034   void Print(std::ostream &) const;
00035 
00036   typedef enum {
00037     UNKNOWN,
00038     AXIAL,
00039     CORONAL,
00040     SAGITTAL,
00041     OBLIQUE
00042   } OrientationType;
00043 
00046   static OrientationType GetType(const double dircos[6]);
00047 
00049   static void SetObliquityThresholdCosineValue(double val);
00050   static double GetObliquityThresholdCosineValue();
00051 
00053   static const char *GetLabel(OrientationType type);
00054 
00055 protected:
00056   static char GetMajorAxisFromPatientRelativeDirectionCosine(double x, double y, double z);
00057 
00058 private:
00059   static double ObliquityThresholdCosineValue;
00060 };
00061 //-----------------------------------------------------------------------------
00062 inline std::ostream& operator<<(std::ostream &os, const Orientation &o)
00063 {
00064   o.Print( os );
00065   return os;
00066 }
00067 
00068 } // end namespace gdcm
00069 
00070 #endif //GDCMORIENTATION_H

Generated on Sat Dec 4 2010 08:58:44 for GDCM by doxygen 1.7.2
SourceForge.net Logo