GDCM  2.2.0
gdcmDirectionCosines.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 GDCMDIRECTIONCOSINES_H
00015 #define GDCMDIRECTIONCOSINES_H
00016 
00017 #include "gdcmTypes.h"
00018 
00019 namespace gdcm
00020 {
00021 
00025 class GDCM_EXPORT DirectionCosines
00026 {
00027 public:
00028   DirectionCosines();
00029   DirectionCosines(const double dircos[6]);
00030   // Cannot get the following signature to be wrapped with swig...
00031   //DirectionCosines(const double *dircos = 0 );
00032   ~DirectionCosines();
00033 
00035   void Print(std::ostream &) const;
00036 
00038   void Cross(double z[3]) const;
00039 
00041   double Dot() const;
00042 
00044   void Normalize();
00045 
00047   operator const double* () const { return Values; }
00048 
00050   bool IsValid() const;
00051 
00054   bool SetFromString(const char *str);
00055 
00057   double CrossDot(DirectionCosines const &dc) const;
00058 
00060   double ComputeDistAlongNormal(const double ipp[3]) const;
00061 
00062 private:
00063   double Values[6];
00064 };
00065 
00066 } // end namespace gdcm
00067 
00068 #endif //GDCMDIRECTIONCOSINES_H

Generated on Sun Jun 3 2012 14:19:41 for GDCM by doxygen 1.8.0
SourceForge.net Logo