X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFile.h;h=7c08ed37a2a0d76b0bee4f778b237d46f89bb73c;hb=bde18845deffbd09ed1c154d28e09284ae39cd76;hp=361bc3d81285154b3360d1b89e92decc94cf8e1a;hpb=e28b183ba68aa3cc84a44a779a31f9d906a1ad2f;p=gdcm.git diff --git a/src/gdcmFile.h b/src/gdcmFile.h index 361bc3d8..7c08ed37 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/10/18 12:49:22 $ - Version: $Revision: 1.63 $ + Date: $Date: 2004/11/16 16:20:23 $ + Version: $Revision: 1.69 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -25,7 +25,6 @@ namespace gdcm { - //----------------------------------------------------------------------------- /* * In addition to Dicom header exploration, this class is designed @@ -43,25 +42,22 @@ public: /// Accessor to \ref Header Header* GetHeader() { return HeaderInternal; } - int ComputeDecompressedPixelDataSizeFromHeader(); - /// Accessor to \ref ImageDataSize - size_t GetImageDataSize(){ return ImageDataSize; }; + size_t GetImageDataSize() { return ImageDataSize; }; /// Accessor to \ref ImageDataSizeRaw - size_t GetImageDataSizeRaw(){ return ImageDataSizeRaw; }; + size_t GetImageDataSizeRaw() { return ImageDataSizeRaw; }; + + /// Accessor to \ref PixelConverter + PixelConvert* GetPixelConverter() { return PixelConverter; }; uint8_t* GetImageData(); size_t GetImageDataIntoVector(void* destination, size_t maxSize); uint8_t* GetImageDataRaw(); - void GetImageDataIntoVectorRaw(void* destination, size_t maxSize); // see also Header::SetImageDataSize ?!? bool SetImageData (uint8_t* data, size_t expectedSize); - /// \todo When the caller is aware we simply point to the data: - /// int SetImageDataNoCopy (void* Data, size_t ExpectedSize); - // Write pixels of ONE image on hard drive // No test is made on processor "endianity" // The user must call his reader correctly @@ -70,10 +66,6 @@ public: bool WriteDcmExplVR(std::string const& fileName); bool WriteAcr (std::string const& fileName); - // Don't look any longer for the code : - // It's in file gdcmParsePixels.cxx - bool ParsePixelData(); - virtual bool SetEntryByNumber(std::string const& content, uint16_t group, uint16_t element) { @@ -88,21 +80,15 @@ protected: private: void Initialise(); - // For JPEG 8 Bits, body in file gdcmJpeg.cxx - bool gdcm_write_JPEG_file (FILE* fp, void* image_buffer, - int image_width, int image_heigh, - int quality); - - // For JPEG 12 Bits, body in file gdcmJpeg12.cxx - bool gdcm_write_JPEG_file12 (FILE* fp, void* image_buffer, - int image_width, int image_height, - int quality); - void SaveInitialValues(); // will belong to the future PixelData class void RestoreInitialValues(); // will belong to the future PixelData class void DeleteInitialValues(); // will belong to the future PixelData class + uint8_t* GetDecompressed(); + int ComputeDecompressedPixelDataSizeFromHeader(); private: + void SetPixelData(uint8_t* data); + // members variables: /// Header to use to load the file @@ -113,12 +99,13 @@ private: /// the destructor is in charge of deletion. bool SelfHeader; - /// wether already parsed + /// Wether already parsed or not bool Parsed; - /// FIXME - PixelConvert PixelConverter; -// + /// Utility pixel converter + PixelConvert* PixelConverter; + +/// FIXME // --------------- Will be moved to a PixelData class //