Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmRLEFrame.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmRLEFrame.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/01 18:37:31 $
00007   Version:   $Revision: 1.15 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
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 } // end namespace gdcm
00070 //-----------------------------------------------------------------------------
00071 #endif

Generated on Thu Feb 10 22:17:59 2005 for gdcm by doxygen 1.3.6