From: malaterre Date: Mon, 23 May 2005 13:28:19 +0000 (+0000) Subject: ENH: Minor commit to illustrate what was done to create the mpeg file out of the... X-Git-Tag: Version1.2.bp~672 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3f47a0d9d15ce4235caaaea55235d61e36e782c9;hp=1ca3acfeda301168a36d4e15a68d3685f9b91fc9;p=gdcm.git ENH: Minor commit to illustrate what was done to create the mpeg file out of the dicom file --- diff --git a/src/gdcmMpeg.cxx b/src/gdcmMpeg.cxx index c684cd92..44a8ebb8 100644 --- a/src/gdcmMpeg.cxx +++ b/src/gdcmMpeg.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmMpeg.cxx,v $ Language: C++ - Date: $Date: 2005/05/21 20:03:48 $ - Version: $Revision: 1.2 $ + Date: $Date: 2005/05/23 13:28:19 $ + Version: $Revision: 1.3 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -307,10 +307,18 @@ namespace gdcm * @return 1 on success, 0 on error */ -bool ReadMPEGFile (std::ifstream *fp, void *image_buffer) +bool ReadMPEGFile (std::ifstream *fp, void *image_buffer, size_t length) { int ret, code; +#if 0 + fp->read((char*)image_buffer, length); + + ofstream out("/tmp/etiam.mpeg"); + out.write((char*)image_buffer, length); + out.close(); +#endif + // Clear_Options(); /* decode command line arguments */ diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index 83a4b425..d2abc9e1 100644 --- a/src/gdcmPixelReadConvert.cxx +++ b/src/gdcmPixelReadConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.cxx,v $ Language: C++ - Date: $Date: 2005/05/22 20:33:09 $ - Version: $Revision: 1.58 $ + Date: $Date: 2005/05/23 13:28:19 $ + Version: $Revision: 1.59 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -31,7 +31,7 @@ namespace gdcm { -//bool ReadMPEGFile (std::ifstream *fp, void *image_buffer); +//bool ReadMPEGFile (std::ifstream *fp, void *image_buffer, size_t lenght); //bool gdcm_read_JPEG2000_file (std::ifstream* fp, void* raw, size_t inputlength); //----------------------------------------------------------------------------- #define str2num(str, typeNum) *((typeNum *)(str)) @@ -258,7 +258,7 @@ bool PixelReadConvert::ReadAndDecompressPixelData( std::ifstream *fp ) { //gdcmWarningMacro( "Sorry, MPEG not yet taken into account" ); //return false; -// ReadMPEGFile(fp, Raw); // fp has already been seek to start of mpeg +// ReadMPEGFile(fp, Raw, PixelDataLength); // fp has already been seek to start of mpeg return true; } else