X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmRLEFrame.h;h=0d5dd3e975d4c99e97509d86c6b54967c26e2def;hb=7c8b232fb62e92da08750b81d3126651f60b8f3f;hp=21b2dd30c1ec01fc09d3fd65d8124cb6cc49bd98;hpb=ba78e6c6d47d6db1528e8e88e5ebde7296a26692;p=gdcm.git diff --git a/src/gdcmRLEFrame.h b/src/gdcmRLEFrame.h index 21b2dd30..0d5dd3e9 100644 --- a/src/gdcmRLEFrame.h +++ b/src/gdcmRLEFrame.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFrame.h,v $ Language: C++ - Date: $Date: 2004/12/03 20:16:58 $ - Version: $Revision: 1.10 $ + Date: $Date: 2005/02/01 18:37:31 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -23,6 +23,7 @@ #include "gdcmCommon.h" #include +#include namespace gdcm { @@ -44,15 +45,26 @@ namespace gdcm */ class GDCM_EXPORT RLEFrame { -friend class Document; -friend class PixelReadConvert; - unsigned int NumberFragments; - long Offset[15]; - long Length[15]; public: - RLEFrame() { NumberFragments = 0; } - void Print( std::string indent = "", std::ostream &os = std::cout ); - + RLEFrame() { NumberOfFragments = 0; } + void Print( std::ostream &os = std::cout, std::string indent = "" ); + + void SetNumberOfFragments(unsigned int number) { NumberOfFragments = number; }; + unsigned int GetNumberOfFragments() { return NumberOfFragments; }; + void SetOffset(unsigned int id, long offset); + long GetOffset(unsigned int id); + void SetLength(unsigned int id, long length); + long GetLength(unsigned int id); + + uint8_t *ReadAndDecompressRLEFrame( uint8_t *subRaw,long rawSegmentSize, + std::ifstream *fp ); + bool ReadAndDecompressRLEFragment( uint8_t *subRaw, long fragmentSize, + long rawSegmentSize, std::ifstream *fp ); + +private: + unsigned int NumberOfFragments; + long Offset[15]; + long Length[15]; }; } // end namespace gdcm //-----------------------------------------------------------------------------