]> Creatis software - gdcm.git/blob - src/gdcmPixelWriteConvert.cxx
* src/gdcmPixelWriteConvert.[h|cxx] : new class to write datas (and in the
[gdcm.git] / src / gdcmPixelWriteConvert.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmPixelWriteConvert.cxx,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 //////////////////   TEMPORARY NOTE
20 // look for "fixMem" and convert that to a member of this class
21 // Removing the prefix fixMem and dealing with allocations should do the trick
22 //
23 // grep PixelWriteConvert everywhere and clean up !
24
25 #include "gdcmDebug.h"
26 #include "gdcmPixelWriteConvert.h"
27 #include <stdio.h>
28
29 namespace gdcm
30 {
31 //-----------------------------------------------------------------------------
32 // Constructor / Destructor
33 PixelWriteConvert::PixelWriteConvert() 
34 {
35    ReadData = 0;
36    ReadDataSize = 0;
37
38    UserData = 0;
39    UserDataSize = 0;
40 }
41
42 PixelWriteConvert::~PixelWriteConvert() 
43 {
44 }
45
46 //-----------------------------------------------------------------------------
47 // Public
48 void PixelWriteConvert::SetReadData(uint8_t* data,size_t size)
49 {
50    ReadData = data;
51    ReadDataSize = size;
52 }
53
54 void PixelWriteConvert::SetUserData(uint8_t* data,size_t size)
55 {
56    UserData = data;
57    UserDataSize = size;
58 }
59
60 //-----------------------------------------------------------------------------
61 } // end namespace gdcm
62
63 // NOTES on File internal calls
64 // User
65 // ---> GetImageData
66 //     ---> GetImageDataIntoVector
67 //        |---> GetImageDataIntoVectorRaw
68 //        | lut intervention
69 // User
70 // ---> GetImageDataRaw
71 //     ---> GetImageDataIntoVectorRaw