]> Creatis software - gdcm.git/blobdiff - src/gdcmJPEGFragment.h
* gdcmDicomDirElement.[h|cxx] : change the AddEntry method. Now, it gets a
[gdcm.git] / src / gdcmJPEGFragment.h
index 203cd2e663cbb8e014cbd319b4715f09bc1a5762..928049fc6e8a895c434ca1e9e79625511b7e6f53 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJPEGFragment.h,v $
   Language:  C++
-  Date:      $Date: 2004/12/03 10:21:54 $
-  Version:   $Revision: 1.5 $
+  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
@@ -39,14 +42,21 @@ namespace gdcm
  */
 class GDCM_EXPORT JPEGFragment
 {
-friend class Document;
-friend class File;
-friend class PixelReadConvert;
-   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