X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmPixelWriteConvert.cxx;h=b4f67961000b0600e0a85cca0e6bec4e2d8f58c3;hb=fb3bc19d96ec0bf38de3a466208a891a799f4797;hp=a4f8cec9072a94114db333ec351f4976b0b2a17e;hpb=5d1776a78fb7d94a8325a00e438f7be82c16053c;p=gdcm.git diff --git a/src/gdcmPixelWriteConvert.cxx b/src/gdcmPixelWriteConvert.cxx index a4f8cec9..b4f67961 100644 --- a/src/gdcmPixelWriteConvert.cxx +++ b/src/gdcmPixelWriteConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelWriteConvert.cxx,v $ Language: C++ - Date: $Date: 2004/12/03 11:55:38 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/09/21 09:44:59 $ + Version: $Revision: 1.10 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -16,56 +16,99 @@ =========================================================================*/ -////////////////// TEMPORARY NOTE -// look for "fixMem" and convert that to a member of this class -// Removing the prefix fixMem and dealing with allocations should do the trick -// -// grep PixelWriteConvert everywhere and clean up ! - #include "gdcmDebug.h" #include "gdcmPixelWriteConvert.h" -#include namespace gdcm { //----------------------------------------------------------------------------- // Constructor / Destructor +/** + * \brief Constructor + */ PixelWriteConvert::PixelWriteConvert() { - ReadData = 0; + ReadData = 0; ReadDataSize = 0; - UserData = 0; + UserData = 0; UserDataSize = 0; } +/** + * \brief Destructor + */ PixelWriteConvert::~PixelWriteConvert() { } //----------------------------------------------------------------------------- // Public -void PixelWriteConvert::SetReadData(uint8_t* data,size_t size) +/** + * \brief SetReadData + * @param data data (uint8_t is for prototyping. if your data is not uint8_t + * just cast the pointer for calling the method) + * @param size size in bytes + */ +void PixelWriteConvert::SetReadData(uint8_t *data, size_t size) { ReadData = data; ReadDataSize = size; } -void PixelWriteConvert::SetUserData(uint8_t* data,size_t size) +/** + * \brief Sets User Data + * @param data data (uint8_t is for prototyping. if your data is not uint8_t + * just cast the pointer for calling the method) + * @param size size in bytes + */ +void PixelWriteConvert::SetUserData(uint8_t *data, size_t size) { UserData = data; UserDataSize = size; } +/** + * \brief Get Data (UserData or ReadData) + * @return data (uint8_t is for prototyping. if your data is + * *not* uint8_t, just cast the returned pointer) + */ +uint8_t *PixelWriteConvert::GetData() +{ + if ( UserData ) + { + return UserData; + } + else + { + return ReadData; + } +} + +/** + * \brief Get Data Size (UserData or ReadData) + * @return size size in bytes + */ +size_t PixelWriteConvert::GetDataSize() +{ + if ( UserData ) + { + return UserDataSize; + } + else + { + return ReadDataSize; + } +} + //----------------------------------------------------------------------------- -} // end namespace gdcm +// Protected + +//----------------------------------------------------------------------------- +// Private -// NOTES on File internal calls -// User -// ---> GetImageData -// ---> GetImageDataIntoVector -// |---> GetImageDataIntoVectorRaw -// | lut intervention -// User -// ---> GetImageDataRaw -// ---> GetImageDataIntoVectorRaw +//----------------------------------------------------------------------------- +// Print + +//----------------------------------------------------------------------------- +} // end namespace gdcm