From: jpr Date: Wed, 5 Nov 2003 14:31:00 +0000 (+0000) Subject: * Fix :Oops ! Forgot to commit gdcmFile::GetImageDataSizeRaw(); X-Git-Tag: Version0.3.1~54 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=398de28036f1804dd0a77d5b715315f014253496;p=gdcm.git * Fix :Oops ! Forgot to commit gdcmFile::GetImageDataSizeRaw(); that returns the pixel area size to the *aware* (vtk) user that DOESN'T want to turn the PALETTE COLOR image into an RGB image --- diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 32ef12b9..1a57bb6d 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -96,6 +96,21 @@ void gdcmFile::SetPixelDataSizeFromHeader(void) { // 0028|1203 [US] [Blue Palette Color Lookup Table Data] +///////////////////////////////////////////////////////////////// +/** + * \ingroup gdcmFile + * \brief Returns the size (in bytes) of required memory to hold + * \ the pixel data represented in this file, when user DOESN'T want + * \ to get RGB pixels image when it's stored as a PALETTE COLOR image + * \ - the (vtk) user is supposed to know how deal with LUTs - + * \ warning to be used with GetImagePixelsRaw() + * @return The size of pixel data in bytes. + */ + +size_t gdcmFile::GetImageDataSizeRaw(void) { + return (lgrTotaleRaw); +} + ///////////////////////////////////////////////////////////////// /** * \ingroup gdcmFile diff --git a/src/gdcmFile.h b/src/gdcmFile.h index 9d2f2185..caed93e6 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -50,6 +50,7 @@ public: void SetPixelDataSizeFromHeader(void); size_t GetImageDataSize(); + size_t GetImageDataSizeRaw(); void * GetImageData(); size_t GetImageDataIntoVector(void* destination, size_t MaxSize); void * GetImageDataRaw();