X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmPixelWriteConvert.h;h=8764adf0c2dc1f43c686c9bcf807b3ce4b1168d9;hb=df832cf7f90b4ca5aca2f628c1756fb276779fac;hp=4f3b5b39a1820e0c6938c7c67ae4b0f87ee403b9;hpb=327dfe7647e3720b0f3125f9b19397cb9afc0ed3;p=gdcm.git diff --git a/src/gdcmPixelWriteConvert.h b/src/gdcmPixelWriteConvert.h index 4f3b5b39..8764adf0 100644 --- a/src/gdcmPixelWriteConvert.h +++ b/src/gdcmPixelWriteConvert.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelWriteConvert.h,v $ Language: C++ - Date: $Date: 2005/01/06 20:03:28 $ - Version: $Revision: 1.5 $ + Date: $Date: 2007/08/22 16:14:04 $ + Version: $Revision: 1.11 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -17,38 +17,50 @@ =========================================================================*/ -#ifndef GDCMPIXELWRITECONVERT_H -#define GDCMPIXELWRITECONVERT_H +#ifndef _GDCMPIXELWRITECONVERT_H_ +#define _GDCMPIXELWRITECONVERT_H_ #include "gdcmCommon.h" #include "gdcmBase.h" -namespace gdcm +namespace GDCM_NAME_SPACE { -/* +/** * \brief Utility container for gathering the various forms the pixel data - * migth take during the user demanded processes. + * migth take during the user requiered processes. + * \warning None of the methods may be called by end user (they have no + * meaning outside the class FileHelper) */ +class File; class GDCM_EXPORT PixelWriteConvert : public Base { -public: +friend class FileHelper; + +private: PixelWriteConvert(); virtual ~PixelWriteConvert(); // Set/Get of images and their size - void SetReadData(uint8_t *data,size_t size); + void SetReadData(uint8_t *data, size_t size); + /// \brief returns ReadData uint8_t *GetReadData() { return ReadData; } + /// \brief returns ReadDataSize size_t GetReadDataSize() { return ReadDataSize; } - void SetUserData(uint8_t *data,size_t size); + /// \brief Set UserData + void SetUserData(uint8_t *data, size_t size); + /// \brief returns UserData uint8_t *GetUserData() { return UserData; } + /// \brief returns UserDataSize size_t GetUserDataSize() { return UserDataSize; } // Get the used image and its size uint8_t *GetData(); size_t GetDataSize(); -private: + void SetCompressJPEG2000UserData(uint8_t *data, size_t size, File *image); + void SetCompressJPEGUserData(uint8_t *data, size_t size, File *image); + // Variables /// Pixel data represented as RGB after LUT color interpretation. uint8_t *ReadData; @@ -59,6 +71,9 @@ private: uint8_t *UserData; /// Size of User image. size_t UserDataSize; + + /// Whether we want to write compressed or not + bool Compressed; }; } // end namespace gdcm