Program: gdcm
Module: $RCSfile: gdcmJPEGFragment.h,v $
Language: C++
- Date: $Date: 2004/10/20 14:30:40 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2005/01/20 16:17:00 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#define GDCMJPEGFRAGMENT_H
#include "gdcmCommon.h"
+
#include <iostream>
+#include <fstream>
namespace gdcm
{
+#define JOCTET uint8_t
/**
* \brief Utility class for summerizing the informations of a JPEG
*/
class GDCM_EXPORT JPEGFragment
{
-friend class Document;
-friend class File;
-friend class PixelConvert;
- long Offset;
- long Length;
public:
JPEGFragment();
- void Print( std::string indent = "", std::ostream &os = std::cout );
+ void Print( std::ostream &os = std::cout, std::string indent = "" );
+ void DecompressJPEGFramesFromFile(std::ifstream *fp, uint8_t *buffer, int nBits);
+ void DecompressJPEGSingleFrameFragmentsFromFile(JOCTET *buffer, size_t totalLength, uint8_t* raw, int nBits);
+ void DecompressJPEGFragmentedFramesFromFile(JOCTET *buffer, uint8_t* raw, int nBits, size_t &howManyRead, size_t &howManyWritten, size_t totalLength);
+
+private:
+ long Offset;
+ long Length;
+
+friend class Document;
+friend class FileHelper;
+friend class PixelReadConvert;
+friend class JPEGFragmentsInfo;
};
} // end namespace gdcm