X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmPixelWriteConvert.cxx;h=8002dd422fe3c670493650677739e2118e1e20c6;hb=a1d5cc91ff5fed90aa70078fcef84e02a28b4389;hp=b4f67961000b0600e0a85cca0e6bec4e2d8f58c3;hpb=371fcc0f7c29d4b1a7783e3b563a17603e6d4f6f;p=gdcm.git diff --git a/src/gdcmPixelWriteConvert.cxx b/src/gdcmPixelWriteConvert.cxx index b4f67961..8002dd42 100644 --- a/src/gdcmPixelWriteConvert.cxx +++ b/src/gdcmPixelWriteConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelWriteConvert.cxx,v $ Language: C++ - Date: $Date: 2005/09/21 09:44:59 $ - Version: $Revision: 1.10 $ + Date: $Date: 2007/05/23 14:18:11 $ + Version: $Revision: 1.12 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -19,7 +19,7 @@ #include "gdcmDebug.h" #include "gdcmPixelWriteConvert.h" -namespace gdcm +namespace GDCM_NAME_SPACE { //----------------------------------------------------------------------------- // Constructor / Destructor @@ -45,10 +45,10 @@ PixelWriteConvert::~PixelWriteConvert() //----------------------------------------------------------------------------- // Public /** - * \brief SetReadData + * \brief sets Read Data (and size) * @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 + * @param size data size, in bytes */ void PixelWriteConvert::SetReadData(uint8_t *data, size_t size) { @@ -57,10 +57,16 @@ void PixelWriteConvert::SetReadData(uint8_t *data, size_t size) } /** - * \brief Sets User Data + * \brief Sets the internal pointer to the caller's inData + * image representation, BUT WITHOUT COPYING THE DATA. + * - 'image' Pixels are presented as C-like 2D arrays : line per line. + * - 'volume'Pixels are presented as C-like 3D arrays : plane per plane + * \warning Since the pixels are not copied, it is the caller's responsability + * not to deallocate its data before gdcm uses them (e.g. with + * the Write() method ) * @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 + * @param size size, in bytes. */ void PixelWriteConvert::SetUserData(uint8_t *data, size_t size) { @@ -87,7 +93,7 @@ uint8_t *PixelWriteConvert::GetData() /** * \brief Get Data Size (UserData or ReadData) - * @return size size in bytes + * @return size, in bytes. */ size_t PixelWriteConvert::GetDataSize() {