X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmPixelConvert.h;h=02f11f3b3db41ae1acfddd15442be418ec2c9803;hb=879f56a62d0772c95e92d0657882eb1886b4153d;hp=f567a3045c5cd9abfe304f1118fe9d3eabd26245;hpb=689f929ff0f35aabd30d81ffa75eb66fdf1a3c16;p=gdcm.git diff --git a/src/gdcmPixelConvert.h b/src/gdcmPixelConvert.h index f567a304..02f11f3b 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/09/29 17:33:17 $ - Version: $Revision: 1.1 $ + Date: $Date: 2004/10/08 17:02:53 $ + Version: $Revision: 1.4 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,6 +21,8 @@ #define GDCMPIXELCONVERTL_H #include "gdcmCommon.h" +#include "gdcmRLEFramesInfo.h" +#include "gdcmException.h" /* * \brief Utility container for gathering the various forms the pixel data @@ -59,12 +61,38 @@ bool ReadUncompressed( FILE* filePointer, size_t expectedSize ); bool ConvertGrayAndLutToRGB( uint8_t *lutRGBA ); bool ReadAndUncompressRLE8Bits(FILE* fp, size_t uncompressedSize ); -bool UncompressRLE16BitsFromRLE8Bits( size_t PixelNumber, int NumberOfFrames ); - - - - + static bool UncompressRLE16BitsFromRLE8Bits( + int XSize, + int YSize, + int NumberOfFrames, + uint8_t* fixMemUncompressed ); + static bool ReadAndUncompressRLEFragment( + uint8_t* decodedZone, + long fragmentSize, + long uncompressedSegmentSize, + FILE* fp ); + static bool gdcm_read_RLE_file( + void* image_buffer, + int XSize, + int YSize, + int ZSize, + int BitsAllocated, + gdcmRLEFramesInfo* RLEInfo, + FILE* fp ); + static void ConvertDecompress12BitsTo16Bits( + uint8_t* pixelZone, + int sizeX, + int sizeY, + FILE* filePtr) throw ( gdcmFormatError ); + static void SwapZone(void* im, int swap, int lgr, int nb); + static void ConvertReorderEndianity( + uint8_t* pixelZone, + size_t imageDataSize, + int numberBitsStored, + int numberBitsAllocated, + int swapCode, + bool signedPixel ); }; //-----------------------------------------------------------------------------