00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GDCMRLEFRAME_H
00021 #define GDCMRLEFRAME_H
00022
00023 #include "gdcmCommon.h"
00024
00025 #include <iostream>
00026 #include <fstream>
00027
00028 namespace gdcm
00029 {
00046 class GDCM_EXPORT RLEFrame
00047 {
00048 public:
00049 RLEFrame() { NumberOfFragments = 0; }
00050 void Print( std::ostream &os = std::cout, std::string indent = "" );
00051
00052 void SetNumberOfFragments(unsigned int number) { NumberOfFragments = number; };
00053 unsigned int GetNumberOfFragments() { return NumberOfFragments; };
00054 void SetOffset(unsigned int id, long offset);
00055 long GetOffset(unsigned int id);
00056 void SetLength(unsigned int id, long length);
00057 long GetLength(unsigned int id);
00058
00059 uint8_t *ReadAndDecompressRLEFrame( uint8_t *subRaw,long rawSegmentSize,
00060 std::ifstream *fp );
00061 bool ReadAndDecompressRLEFragment( uint8_t *subRaw, long fragmentSize,
00062 long rawSegmentSize, std::ifstream *fp );
00063
00064 private:
00065 unsigned int NumberOfFragments;
00066 long Offset[15];
00067 long Length[15];
00068 };
00069 }
00070
00071 #endif