1 /*=========================================================================
4 Module: $RCSfile: gdcmRLEFramesInfo.h,v $
6 Date: $Date: 2007/09/17 12:16:01 $
7 Version: $Revision: 1.25 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
20 #ifndef _GDCMRLEFRAMESINFO_H_
21 #define _GDCMRLEFRAMESINFO_H_
23 #include "gdcmRLEFrame.h"
27 namespace GDCM_NAME_SPACE
30 * \brief Utility class for gathering the informations of the collection
31 * of RLE frame[s] (see RLEFrame) when handling
32 * "Encapsulated RLE Compressed Images" (see PS 3.5-2003 annex G).
33 * Note: a classical image can be considered as the degenerated case
34 * of a multiframe image. In this case the collection is limited
35 * to a single individual frame.
36 * The informations on each frame are obtained during the pixel parsing
37 * of a gdcm::File (refer to
38 * File::ComputeRLEInfo() ).
39 * They shall be used when (if necessary) decoding the frames.
41 * This class is simply a stl list<> of RLEFrame.
43 class GDCM_EXPORT RLEFramesInfo
45 friend class PixelReadConvert;
50 void Print( std::ostream &os = std::cout, std::string indent = "" );
51 bool DecompressRLEFile( std::ifstream *fp, uint8_t *subRaw, int xSize,
52 int ySize, int zSize, int tSize, int bitsAllocated );
53 bool ConvertRLE16BitsFromRLE8Bits( uint8_t *subRaw, int xSize, int ySize,
54 int tSize, int numberOfFrames);
56 void AddFrame(RLEFrame *frame);
58 RLEFrame *GetFirstFrame();
59 RLEFrame *GetNextFrame();
61 typedef std::list<RLEFrame *> RLEFrameList;
64 RLEFrameList::iterator ItFrames;
66 } // end namespace gdcm
68 //-----------------------------------------------------------------------------