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: 2007/08/22 16:14:04 $
00007   Version:   $Revision: 1.22 $
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 "gdcmBase.h"
00024 
00025 #include <iostream>
00026 #include <fstream>
00027 
00028 namespace GDCM_NAME_SPACE
00029 {
00046 class GDCM_EXPORT RLEFrame : public Base
00047 {
00048 friend class File;
00049 friend class RLEFramesInfo;
00050 private:
00051    RLEFrame() { NumberOfFragments = 0; }
00052    void Print( std::ostream &os = std::cout, std::string const &indent = "" );
00053 
00054    void SetNumberOfFragments(unsigned int number) 
00055                                        { NumberOfFragments = number; }   
00056    unsigned int GetNumberOfFragments() { return NumberOfFragments; }
00057    void SetOffset(unsigned int id, long offset);
00058    long GetOffset(unsigned int id);
00059    void SetLength(unsigned int id, long length);
00060    long GetLength(unsigned int id);
00061 
00062    uint8_t *ReadAndDecompressRLEFrame( uint8_t *subRaw,long rawSegmentSize,
00063                                        std::ifstream *fp );
00064    bool ReadAndDecompressRLEFragment( uint8_t *subRaw, long fragmentSize,
00065                                       long rawSegmentSize, std::ifstream *fp );
00066 
00067    unsigned int NumberOfFragments;
00068    long Offset[15];
00069    long Length[15];
00070 };
00071 } // end namespace gdcm
00072 //-----------------------------------------------------------------------------
00073 #endif

Generated on Fri Aug 24 12:59:31 2007 for gdcm by  doxygen 1.4.6