]> Creatis software - gdcm.git/blobdiff - src/gdcmRLEFrame.h
* Fix compilation warnings on linux
[gdcm.git] / src / gdcmRLEFrame.h
index 735ffffe749c6eab5c55c7088075240b107f7c35..b667116bdc9f0f013ea24614cca7cdda74bed8c5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmRLEFrame.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 10:21:54 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/11/28 17:24:21 $
+  Version:   $Revision: 1.19 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #ifndef GDCMRLEFRAME_H
 #define GDCMRLEFRAME_H
 
-#include "gdcmCommon.h"
+#include "gdcmBase.h"
+
 #include <iostream>
+#include <fstream>
 
 namespace gdcm 
 {
@@ -41,17 +43,31 @@ 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 PixelReadConvert;
-   unsigned int NumberFragments;
-   long    Offset[15];
-   long    Length[15];
-public:
-   RLEFrame() { NumberFragments = 0; }
-   void Print( std::string indent = "", std::ostream &os = std::cout );
-   
+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) 
+                                       { 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
 //-----------------------------------------------------------------------------