]> Creatis software - gdcm.git/blob - src/gdcmPixelWriteConvert.h
59ddb91409bd1f2e71bf1e0d74d68f7d933c71fd
[gdcm.git] / src / gdcmPixelWriteConvert.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmPixelWriteConvert.h,v $
5   Language:  C++
6   Date:      $Date: 2007/05/23 14:18:11 $
7   Version:   $Revision: 1.9 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19
20 #ifndef GDCMPIXELWRITECONVERT_H
21 #define GDCMPIXELWRITECONVERT_H
22
23 #include "gdcmCommon.h"
24 #include "gdcmBase.h"
25
26 namespace GDCM_NAME_SPACE
27 {
28 /**
29  * \brief Utility container for gathering the various forms the pixel data
30  *        migth take during the user requiered processes.
31  * \warning None of the methods may be called by end user (they have no
32  *          meaning outside the class FileHelper)
33  */
34 class GDCM_EXPORT PixelWriteConvert : public Base
35 {
36 friend class FileHelper;
37
38 private:
39    PixelWriteConvert();
40    virtual ~PixelWriteConvert();
41
42    // Set/Get of images and their size
43    void SetReadData(uint8_t *data, size_t size);
44    /// \brief returns ReadData
45    uint8_t *GetReadData() { return ReadData; }
46    /// \brief returns ReadDataSize
47    size_t   GetReadDataSize() { return ReadDataSize; }
48
49    /// \brief Set UserData
50    void SetUserData(uint8_t *data, size_t size);
51    /// \brief returns UserData
52    uint8_t *GetUserData() { return UserData; }
53    /// \brief returns UserDataSize
54    size_t   GetUserDataSize() { return UserDataSize; }
55
56    // Get the used image and its size
57    uint8_t *GetData();
58    size_t   GetDataSize();
59
60 // Variables
61    /// Pixel data represented as RGB after LUT color interpretation.
62    uint8_t *ReadData;
63    /// Size of RGB image.
64    size_t   ReadDataSize;
65
66    /// User pixel data
67    uint8_t *UserData;
68    /// Size of User image.
69    size_t   UserDataSize;
70 };
71 } // end namespace gdcm
72
73 //-----------------------------------------------------------------------------
74 #endif