X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFile.h;h=908370961863810ff393fd9bf7c9e625f16758df;hb=332835b05f78803ae6d2e92cf95c25548a229532;hp=b58a6b595beb31ba146a9d09d5e8bb06da4f387f;hpb=e6671b4378ba33a2cdf7c711e4e45250af74dbbc;p=gdcm.git diff --git a/src/gdcmFile.h b/src/gdcmFile.h index b58a6b59..90837096 100644 --- a/src/gdcmFile.h +++ b/src/gdcmFile.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.h,v $ Language: C++ - Date: $Date: 2004/07/31 23:30:04 $ - Version: $Revision: 1.41 $ + Date: $Date: 2004/09/03 07:57:10 $ + Version: $Revision: 1.44 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -31,9 +31,8 @@ class GDCM_EXPORT gdcmFile { public: - gdcmFile(gdcmHeader *header); - gdcmFile(std::string const & filename, - bool exception_on_error = false); + gdcmFile( gdcmHeader *header ); + gdcmFile( std::string const & filename ); virtual ~gdcmFile(); @@ -41,7 +40,12 @@ public: gdcmHeader* GetHeader() { return Header; } void SetPixelDataSizeFromHeader(); - size_t GetImageDataSize(); + + +/// \brief Returns the size (in bytes) of required memory to hold +/// the pixel data represented in this file. + size_t GetImageDataSize(){ return ImageDataSize; }; + size_t GetImageDataSizeRaw(); void * GetImageData(); @@ -99,7 +103,7 @@ private: // For JPEG 2000, body in file gdcmJpeg2000.cxx bool gdcm_read_JPEG2000_file (FILE *fp, void* image_buffer); - // For Run Length Encoding (TOCHECK) + // For Run Length Encoding bool gdcm_read_RLE_file (FILE *fp, void* image_buffer); // members variables: @@ -125,10 +129,25 @@ private: /// \brief ==1 if GetImageDataRaw was used /// ==0 if GetImageData was used /// ==-1 if ImageData never read - int PixelRead; + int PixelRead; + + /// wether already parsed + bool Parsed; + + /// \brief length of the last allocated area devoided to receive Pixels + /// ( to allow us not to (free + new) if un necessary ) + size_t LastAllocatedPixelDataLength; + + /// \brief Samples Per Pixel (0x0028,0x0002), as found on disk + std::string InitialSpp; + /// \brief Photometric Interpretation (0x0028,0x0004), as found on disk + std::string InitialPhotInt; + /// \brief Planar Configuration (0x0028,0x0006), as found on disk + std::string InitialPlanConfig; + /// \brief Bits Allocated (0x0028,0x0100), as found on disk + std::string InitialBitsAllocated; + - /// wether already parsed - int Parsed; }; //-----------------------------------------------------------------------------