]> Creatis software - gdcm.git/blobdiff - src/gdcmPixelConvert.h
* Amelioration of code, remove some code copy. For the loading of
[gdcm.git] / src / gdcmPixelConvert.h
index e65a701c0470924d1c532f48af57be3adcadb175..074db2ba22c52362815e112674491c8a46063087 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelConvert.h,v $
   Language:  C++
-  Date:      $Date: 2004/10/18 12:49:23 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2004/10/25 04:08:20 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -18,7 +18,7 @@
 
 
 #ifndef GDCMPIXELCONVERT_H
-#define GDCMPIXELCONVERTL_H
+#define GDCMPIXELCONVERT_H
 
 #include "gdcmCommon.h"
 #include "gdcmRLEFramesInfo.h"
 
 namespace gdcm
 {
-                                                                                
 /*
  * \brief Utility container for gathering the various forms the pixel data
  *        migth take during the user demanded processes.
  */
-class GDCM_EXPORT PixelConvert {
+class GDCM_EXPORT PixelConvert
+{
 public:
    PixelConvert();
    ~PixelConvert();
@@ -48,11 +48,13 @@ public:
    //// Predicates:
    bool IsDecompressedRGB();
 
+   void Print( std::string indent = "", std::ostream &os = std::cout );
+
 // In progress
    void GrabInformationsFromHeader( Header* header );
-   bool ReadAndDecompressPixelData( FILE* fp );
+   bool ReadAndDecompressPixelData( std::ifstream* fp );
    void Squeeze();
-   bool BuildRGBImage( FILE* fp );
+   bool BuildRGBImage();
 
 private:
    // Use the fp:
@@ -60,14 +62,15 @@ private:
                   uint8_t* subDecompressed,
                   long fragmentSize,
                   long decompressedSegmentSize,
-                  FILE* fp );
-   void ReadAndDecompress12BitsTo16Bits( FILE* fp ) throw ( FormatError );
-   bool ReadAndDecompressRLEFile( FILE* fp );
-   bool ReadAndDecompressJPEGFile( FILE* fp );
-   void BuildLUTRGBA( FILE* fp );
+                  std::ifstream* fp );
+   void ReadAndDecompress12BitsTo16Bits( std::ifstream* fp ) throw ( FormatError );
+   bool ReadAndDecompressRLEFile( std::ifstream* fp );
+   bool ReadAndDecompressJPEGFile( std::ifstream* fp );
+   void BuildLUTRGBA( std::ifstream* fp );
 
    // In place (within Decompressed and with no fp access) decompression
    // or convertion:
+   void BuildLUTRGBA();
    bool DecompressRLE16BitsFromRLE8Bits( int NumberOfFrames );
    void ConvertSwapZone();
    void ConvertReorderEndianity();