X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmPixelConvert.h;h=074db2ba22c52362815e112674491c8a46063087;hb=edfc14dd195f9759cf02da0959d96d1499d572be;hp=e65a701c0470924d1c532f48af57be3adcadb175;hpb=e28b183ba68aa3cc84a44a779a31f9d906a1ad2f;p=gdcm.git diff --git a/src/gdcmPixelConvert.h b/src/gdcmPixelConvert.h index e65a701c..074db2ba 100644 --- a/src/gdcmPixelConvert.h +++ b/src/gdcmPixelConvert.h @@ -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" @@ -28,12 +28,12 @@ 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();