]> Creatis software - gdcm.git/blob - src/gdcmPixelWriteConvert.h
Fix mistypings
[gdcm.git] / src / gdcmPixelWriteConvert.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmPixelWriteConvert.h,v $
5   Language:  C++
6   Date:      $Date: 2007/08/22 16:14:04 $
7   Version:   $Revision: 1.11 $
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 File;
35 class GDCM_EXPORT PixelWriteConvert : public Base
36 {
37 friend class FileHelper;
38
39 private:
40    PixelWriteConvert();
41    virtual ~PixelWriteConvert();
42
43    // Set/Get of images and their size
44    void SetReadData(uint8_t *data, size_t size);
45    /// \brief returns ReadData
46    uint8_t *GetReadData() { return ReadData; }
47    /// \brief returns ReadDataSize
48    size_t   GetReadDataSize() { return ReadDataSize; }
49
50    /// \brief Set UserData
51    void SetUserData(uint8_t *data, size_t size);
52    /// \brief returns UserData
53    uint8_t *GetUserData() { return UserData; }
54    /// \brief returns UserDataSize
55    size_t   GetUserDataSize() { return UserDataSize; }
56
57    // Get the used image and its size
58    uint8_t *GetData();
59    size_t   GetDataSize();
60
61    void SetCompressJPEG2000UserData(uint8_t *data, size_t size, File *image);
62    void SetCompressJPEGUserData(uint8_t *data, size_t size, File *image);
63
64 // Variables
65    /// Pixel data represented as RGB after LUT color interpretation.
66    uint8_t *ReadData;
67    /// Size of RGB image.
68    size_t   ReadDataSize;
69
70    /// User pixel data
71    uint8_t *UserData;
72    /// Size of User image.
73    size_t   UserDataSize;
74
75    /// Whether we want to write compressed or not
76    bool Compressed;
77 };
78 } // end namespace gdcm
79
80 //-----------------------------------------------------------------------------
81 #endif