From: jpr Date: Wed, 8 Jan 2003 18:08:59 +0000 (+0000) Subject: harmonisation des codes retour UNFOUND et gdcm::Unfound X-Git-Tag: April2003~61 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=135451ffa2be2f260c1c0fba60a212f8ebe63c62;p=gdcm.git harmonisation des codes retour UNFOUND et gdcm::Unfound --- diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 2deae804..bf9cf3e3 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -192,6 +192,9 @@ void * gdcmFile::GetImageData (void) { Pixels = _Pixels; lgrTotale = _lgrTotale; + // et on le retourne + // ca fait double emploi, il faudra nettoyer ça + return (_Pixels); } diff --git a/src/gdcmHeader.cxx b/src/gdcmHeader.cxx index 4f208912..e9e31dc4 100644 --- a/src/gdcmHeader.cxx +++ b/src/gdcmHeader.cxx @@ -30,6 +30,11 @@ namespace Error { //FIXME: this looks dirty to me... #define str2num(str, typeNum) *((typeNum *)(str)) +// str est un pointeur dans un tableau de caractères, qui doit contenir, +// à cet endroit la, la représentation binaire d'un entier (16 ou 32 bits) +// je veux récupérer ça ... dans un entier. +// s'il y a une autre solution, évitant des cast et les indirections, +// je suis preneur VRHT * gdcmHeader::dicom_vr = (VRHT*)0; gdcmDictSet* gdcmHeader::Dicts = new gdcmDictSet(); @@ -238,11 +243,12 @@ void gdcmHeader::SwitchSwapToBigEndian(void) { sw = 3412; } -void gdcmHeader::GetPixels(size_t lgrTotale, void* Pixels) { +void gdcmHeader::GetPixels(size_t lgrTotale, void* _Pixels) { size_t pixelsOffset; pixelsOffset = GetPixelOffset(); + printf("pixelsOffset %d\n",pixelsOffset); fseek(fp, pixelsOffset, SEEK_SET); - fread(Pixels, 1, lgrTotale, fp); + fread(_Pixels, 1, lgrTotale, fp); } @@ -944,7 +950,7 @@ size_t gdcmHeader::GetPixelOffset(void) { guint16 grPixel; guint16 numPixel; string ImageLocation = GetPubElValByName("Image Location"); - if ( ImageLocation == "UNFOUND" ) { + if ( ImageLocation == "gdcm::Unfound" ) { grPixel = 0x7fe0; } else { grPixel = (guint16) atoi( ImageLocation.c_str() );