]> Creatis software - gdcm.git/blobdiff - src/gdcmJPEGFragment.h
First stage of name normalisation : gdcm::File replace by gdcm::FileHelper
[gdcm.git] / src / gdcmJPEGFragment.h
index a446d9c77f098befd64f4d4c5ec586658183f63f..928049fc6e8a895c434ca1e9e79625511b7e6f53 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJPEGFragment.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 20:16:58 $
-  Version:   $Revision: 1.6 $
+  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
 #include "gdcmCommon.h"
 
 #include <iostream>
+#include <fstream>
 
 namespace gdcm 
 {
+#define JOCTET uint8_t
 
 /**
  * \brief Utility class for summerizing the informations of a JPEG
@@ -42,15 +44,19 @@ class GDCM_EXPORT JPEGFragment
 {
 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 File;
+friend class FileHelper;
 friend class PixelReadConvert;
+friend class JPEGFragmentsInfo;
 };
 } // end namespace gdcm