]> Creatis software - gdcm.git/blob - src/gdcmJPEGFragmentsInfo.h
First stage of name normalisation : gdcm::File replace by gdcm::FileHelper
[gdcm.git] / src / gdcmJPEGFragmentsInfo.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmJPEGFragmentsInfo.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/20 16:17:00 $
7   Version:   $Revision: 1.11 $
8                                                                                 
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.
12                                                                                 
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.
16                                                                                 
17 =========================================================================*/
18
19
20 #ifndef GDCMJPEGFRAGMENTSINFO_H
21 #define GDCMJPEGFRAGMENTSINFO_H
22
23 #include "gdcmJPEGFragment.h"
24
25 #include <list>
26 #include <iostream>
27
28 namespace gdcm 
29 {
30
31 /**
32  * \brief Utility class for gathering the informations of the collection
33  *        of JPEG fragment[s] (see \ref JPEGFragment)  when handling
34  *        "Encapsulated JPEG Compressed Images". 
35  *        The informations on each frame are obtained during the parsing
36  *        of a Document (refer to
37  *         \ref Document::ComputeJPEGFragmentInfo() ).
38  *        They shall be used when (if necessary) decoding the fragments.
39  *
40  *        This class is simply a stl list<> of \ref JPEGFragment.
41  */
42 class GDCM_EXPORT JPEGFragmentsInfo
43 {
44 public:
45    ~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 );
49
50 private:
51    typedef std::list< JPEGFragment* > JPEGFragmentsList;
52    JPEGFragmentsList Fragments;
53
54 friend class Document;
55 friend class FileHelper;
56 friend class PixelReadConvert;
57 };
58 } // end namespace gdcm
59
60 //-----------------------------------------------------------------------------
61 #endif
62