X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmRLEFrame.h;h=e6cc6882b26eca58b1e7123afc2c37ec01589ab9;hb=a212c7275fb6052e882a981534b966c09ecc1d4e;hp=f1e27c6e3316a7eb5207dd375b030964b0a7b93b;hpb=1d69b92978803204089d270599133917d944c651;p=gdcm.git diff --git a/src/gdcmRLEFrame.h b/src/gdcmRLEFrame.h index f1e27c6e..e6cc6882 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/10/12 04:35:47 $ - Version: $Revision: 1.5 $ + Date: $Date: 2007/08/22 16:14:04 $ + Version: $Revision: 1.22 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -17,11 +17,15 @@ =========================================================================*/ -#ifndef GDCMRLEFRAME_H -#define GDCMRLEFRAME_H +#ifndef _GDCMRLEFRAME_H_ +#define _GDCMRLEFRAME_H_ -#include "gdcmCommon.h" -namespace gdcm +#include "gdcmBase.h" + +#include +#include + +namespace GDCM_NAME_SPACE { /** * \brief Utility class for summerizing the informations of a SINGLE RLE @@ -39,16 +43,30 @@ 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 { -friend class Document; friend class File; -friend class PixelConvert; - int NumberFragments; - long Offset[15]; - long Length[15]; - RLEFrame() { NumberFragments = 0; } - +friend class RLEFramesInfo; +private: + RLEFrame() { NumberOfFragments = 0; } + void Print( std::ostream &os = std::cout, std::string const &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 ); + + unsigned int NumberOfFragments; + long Offset[15]; + long Length[15]; }; } // end namespace gdcm //-----------------------------------------------------------------------------