X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmRLEFrame.h;h=f265b713aa4790cfd1d312e59f813a4494bb6be7;hb=3acf005f361e920d3f141462f65f27a8a6e61c6b;hp=adac8f923b5b0fe9b1cd9df833e736bfa16f5c8f;hpb=a4cff04fcd2023f798a9f1ef6bc9307269abd185;p=gdcm.git diff --git a/src/gdcmRLEFrame.h b/src/gdcmRLEFrame.h index adac8f92..f265b713 100644 --- a/src/gdcmRLEFrame.h +++ b/src/gdcmRLEFrame.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmRLEFrame.h,v $ Language: C++ - Date: $Date: 2005/01/26 11:42:02 $ - Version: $Revision: 1.12 $ + Date: $Date: 2006/02/16 20:06:15 $ + Version: $Revision: 1.20 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,9 +20,10 @@ #ifndef GDCMRLEFRAME_H #define GDCMRLEFRAME_H -#include "gdcmCommon.h" +#include "gdcmBase.h" #include +#include namespace gdcm { @@ -42,21 +43,28 @@ namespace gdcm * - the offsets of each segment of the frame, * - the (corresponding) lengths of each segment of the frame. */ -class GDCM_EXPORT RLEFrame +class GDCM_EXPORT RLEFrame : public Base { -public: - RLEFrame() { NumberFragments = 0; } - void Print( std::ostream &os = std::cout, std::string indent = "" ); +friend class File; +friend class RLEFramesInfo; +private: + RLEFrame() { NumberOfFragments = 0; } + void Print( std::ostream &os = std::cout, std::string const &indent = "" ); - void SetNumberOfFragments(unsigned int number) { NumberFragments = number; }; - unsigned int GetNumberOfFragments() { return NumberFragments; }; - void SetOffset(unsigned int id,long offset); + 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); + void SetLength(unsigned int id, long length); long GetLength(unsigned int id); -private: - unsigned int NumberFragments; + uint8_t *ReadAndDecompressRLEFrame( uint8_t *subRaw,long rawSegmentSize, + std::ifstream *fp ); + bool ReadAndDecompressRLEFragment( uint8_t *subRaw, long fragmentSize, + long rawSegmentSize, std::ifstream *fp ); + + unsigned int NumberOfFragments; long Offset[15]; long Length[15]; };