]> Creatis software - gdcm.git/blob - src/gdcmPixelWriteConvert.h
* src/gdcmPixelWriteConvert.[h|cxx] : new class to write datas (and in the
[gdcm.git] / src / gdcmPixelWriteConvert.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmPixelWriteConvert.h,v $
5   Language:  C++
6   Date:      $Date: 2004/12/03 11:55:38 $
7   Version:   $Revision: 1.1 $
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
25 namespace gdcm
26 {
27 /*
28  * \brief Utility container for gathering the various forms the pixel data
29  *        migth take during the user demanded processes.
30  */
31 class GDCM_EXPORT PixelWriteConvert
32 {
33 public:
34    PixelWriteConvert();
35    virtual ~PixelWriteConvert();
36
37    // Set/Get of images and their size
38    void SetReadData(uint8_t* data,size_t size);
39    uint8_t* GetReadData() { return ReadData; }
40    size_t   GetReadDataSize() { return ReadDataSize; }
41
42    void SetUserData(uint8_t* data,size_t size);
43    uint8_t* GetUserData() { return UserData; }
44    size_t   GetUserDataSize() { return UserDataSize; }
45
46 private:
47 // Variables
48    /// Pixel data represented as RGB after LUT color interpretation.
49    uint8_t* ReadData;
50    /// Size of \ref RGB image.
51    size_t   ReadDataSize;
52
53    /// User pixel data
54    uint8_t* UserData;
55    /// Size of \ref User image.
56    size_t   UserDataSize;
57 };
58 } // end namespace gdcm
59
60 //-----------------------------------------------------------------------------
61 #endif