1 /*=========================================================================
4 Module: $RCSfile: gdcmJPEGFragmentsInfo.h,v $
6 Date: $Date: 2005/01/26 16:28:58 $
7 Version: $Revision: 1.14 $
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 GDCMJPEGFRAGMENTSINFO_H
21 #define GDCMJPEGFRAGMENTSINFO_H
23 #include "gdcmJPEGFragment.h"
31 * \brief Utility class for gathering the informations of the collection
32 * of JPEG fragment[s] (see \ref JPEGFragment) when handling
33 * "Encapsulated JPEG Compressed Images".
34 * The informations on each frame are obtained during the parsing
35 * of a Document (refer to
36 * \ref Document::ComputeJPEGFragmentInfo() ).
37 * They shall be used when (if necessary) decoding the fragments.
39 * This class is simply a stl list<> of \ref JPEGFragment.
41 class GDCM_EXPORT JPEGFragmentsInfo
46 void Print( std::ostream &os = std::cout, std::string const & indent = "" );
47 size_t GetFragmentsLength();
48 void ReadAllFragments(std::ifstream *fp, JOCTET *buffer );
50 void DecompressJPEGFramesFromFile(std::ifstream *fp, uint8_t *buffer, int nBits, int numBytes, int length);
52 void AddFragment(JPEGFragment *fragment);
55 typedef std::list<JPEGFragment *> JPEGFragmentsList;
61 JPEGFragmentsList Fragments;
63 friend class PixelReadConvert;
65 } // end namespace gdcm
67 //-----------------------------------------------------------------------------