X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmHeader.h;h=4e67476300820cf79b243e68b62452934da050ff;hb=4beda181275414e5cba990113f8d16424b2c09e6;hp=b16dd9af44065f88d401af7df3bf49296ead0d01;hpb=1d69b92978803204089d270599133917d944c651;p=gdcm.git diff --git a/src/gdcmHeader.h b/src/gdcmHeader.h index b16dd9af..4e674763 100644 --- a/src/gdcmHeader.h +++ b/src/gdcmHeader.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmHeader.h,v $ Language: C++ - Date: $Date: 2004/10/12 04:35:46 $ - Version: $Revision: 1.89 $ + Date: $Date: 2004/12/03 20:16:58 $ + Version: $Revision: 1.96 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -19,12 +19,10 @@ #ifndef GDCMHEADER_H #define GDCMHEADER_H -#include "gdcmCommon.h" #include "gdcmDocument.h" + namespace gdcm { - - //----------------------------------------------------------------------------- /** * \brief @@ -114,10 +112,10 @@ public: Header(); Header( std::string const & filename ); - virtual ~Header(); + ~Header(); // Standard values and informations contained in the header - virtual bool IsReadable(); + bool IsReadable(); // Some heuristic based accessors, end user intended int GetBitsStored(); @@ -143,7 +141,6 @@ public: float GetXSpacing(); float GetYSpacing(); float GetZSpacing(); - //void GetSpacing(float &x, float &y, float &z); // Useful for rescaling graylevel: float GetRescaleIntercept(); @@ -158,12 +155,11 @@ public: float GetXOrigin(); float GetYOrigin(); float GetZOrigin(); - //void GetOrigin(float &x, float &y, float &z); bool HasLUT(); int GetLUTNbits(); - unsigned char * GetLUTRGBA(); + /// Return the Transfer Syntax as a string std::string GetTransfertSyntaxName(); /// Accessor to \ref Header::GrPixel @@ -172,13 +168,17 @@ public: /// Accessor to \ref Header::NumPixel uint16_t GetNumPixel() { return NumPixel; } - /// Read (used in File) - void SetImageDataSize(size_t expectedSize); + bool Write(std::string fileName, FileType filetype); - void Write(FILE* fp, FileType filetype); + /// Initialize DICOM header when none + void InitializeDefaultHeader(); protected: + /// Replace patient's specific information by 'anonymous' bool AnonymizeHeader(); + + /// Helper function needed to organize DICOM files based on + /// their x,y,z position void GetImageOrientationPatient( float iop[6] ); private: