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

Generated on Tue Mar 27 2012 18:19:33 for GDCM by doxygen 1.8.0
SourceForge.net Logo