Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmPixelWriteConvert.cxx

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmPixelWriteConvert.cxx,v $
00005   Language:  C++
00006   Date:      $Date: 2005/10/23 15:09:19 $
00007   Version:   $Revision: 1.11 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #include "gdcmDebug.h"
00020 #include "gdcmPixelWriteConvert.h"
00021 
00022 namespace gdcm
00023 {
00024 //-----------------------------------------------------------------------------
00025 // Constructor / Destructor
00029 PixelWriteConvert::PixelWriteConvert() 
00030 {
00031    ReadData     = 0;
00032    ReadDataSize = 0;
00033 
00034    UserData     = 0;
00035    UserDataSize = 0;
00036 }
00037 
00041 PixelWriteConvert::~PixelWriteConvert() 
00042 {
00043 }
00044 
00045 //-----------------------------------------------------------------------------
00046 // Public
00053 void PixelWriteConvert::SetReadData(uint8_t *data, size_t size)
00054 {
00055    ReadData = data;
00056    ReadDataSize = size;
00057 }
00058 
00071 void PixelWriteConvert::SetUserData(uint8_t *data, size_t size)
00072 {
00073    UserData = data;
00074    UserDataSize = size;
00075 }
00076 
00082 uint8_t *PixelWriteConvert::GetData()
00083 {
00084    if ( UserData )
00085    {
00086       return UserData;
00087    }
00088    else
00089    {
00090       return ReadData;
00091    }
00092 }
00093 
00098 size_t PixelWriteConvert::GetDataSize()
00099 {
00100    if ( UserData )
00101    {
00102       return UserDataSize;
00103    }
00104    else
00105    {
00106       return ReadDataSize;
00107    }
00108 }
00109 
00110 //-----------------------------------------------------------------------------
00111 // Protected
00112 
00113 //-----------------------------------------------------------------------------
00114 // Private
00115 
00116 //-----------------------------------------------------------------------------
00117 // Print
00118 
00119 //-----------------------------------------------------------------------------
00120 } // end namespace gdcm

Generated on Fri Jan 20 10:14:25 2006 for gdcm by  doxygen 1.4.4