X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=src%2FgdcmFile.cxx;h=ffb3d848027124d12c7a97f93e5e25448d7522e7;hb=54ce6e928bccc91bb12601c782b92c833678de40;hp=fb042163f66476c3d17f6457a19230f262d19a6a;hpb=06c1c583239fdf5196260e6ef83a78669c1bd17f;p=gdcm.git diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index fb042163..ffb3d848 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -137,7 +137,7 @@ void gdcmFile::SetPixelDataSizeFromHeader(void) { int nb; std::string str_nb; - str_nb=Header->GetPubElValByNumber(0x0028,0x0100); + str_nb=Header->GetPubEntryByNumber(0x0028,0x0100); if (str_nb == GDCM_UNFOUND ) { nb = 16; } else { @@ -147,7 +147,7 @@ void gdcmFile::SetPixelDataSizeFromHeader(void) { lgrTotale = lgrTotaleRaw = Header->GetXSize() * Header->GetYSize() * Header->GetZSize() * (nb/8)* Header->GetSamplesPerPixel(); std::string str_PhotometricInterpretation = - Header->GetPubElValByNumber(0x0028,0x0004); + Header->GetPubEntryByNumber(0x0028,0x0004); /*if ( str_PhotometricInterpretation == "PALETTE COLOR " )*/ // pb when undealt Segmented Palette Color @@ -246,11 +246,11 @@ size_t gdcmFile::GetImageDataIntoVector (void* destination, size_t MaxSize) { // CreateOrReplaceIfExist ? std::string spp = "3"; // Samples Per Pixel - Header->SetPubElValByNumber(spp,0x0028,0x0002); + Header->SetPubEntryByNumber(spp,0x0028,0x0002); std::string rgb= "RGB "; // Photometric Interpretation - Header->SetPubElValByNumber(rgb,0x0028,0x0004); + Header->SetPubEntryByNumber(rgb,0x0028,0x0004); std::string planConfig = "0"; // Planar Configuration - Header->SetPubElValByNumber(planConfig,0x0028,0x0006); + Header->SetPubEntryByNumber(planConfig,0x0028,0x0006); } else { // need to make RGB Pixels (?) @@ -266,7 +266,7 @@ size_t gdcmFile::GetImageDataIntoVector (void* destination, size_t MaxSize) { // Segmented xxx Palette Color are *more* than 65535 long ?!? std::string rgb= "MONOCHROME1 "; // Photometric Interpretation - Header->SetPubElValByNumber(rgb,0x0028,0x0004); + Header->SetPubEntryByNumber(rgb,0x0028,0x0004); } @@ -333,7 +333,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) { (void)ReadPixelData(destination); // Nombre de Bits Alloues pour le stockage d'un Pixel - str_nb = Header->GetPubElValByNumber(0x0028,0x0100); + str_nb = Header->GetPubEntryByNumber(0x0028,0x0100); if (str_nb == GDCM_UNFOUND ) { nb = 16; } else { @@ -341,7 +341,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) { } // Nombre de Bits Utilises - str_nbu=Header->GetPubElValByNumber(0x0028,0x0101); + str_nbu=Header->GetPubEntryByNumber(0x0028,0x0101); if (str_nbu == GDCM_UNFOUND ) { nbu = nb; } else { @@ -349,7 +349,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) { } // Position du Bit de Poids Fort - str_highBit=Header->GetPubElValByNumber(0x0028,0x0102); + str_highBit=Header->GetPubEntryByNumber(0x0028,0x0102); if (str_highBit == GDCM_UNFOUND ) { highBit = nb - 1; } else { @@ -358,7 +358,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) { // Pixel sign // 0 = Unsigned // 1 = Signed - str_signe=Header->GetPubElValByNumber(0x0028,0x0103); + str_signe=Header->GetPubEntryByNumber(0x0028,0x0103); if (str_signe == GDCM_UNFOUND ) { signe = 0; // default is unsigned } else { @@ -416,7 +416,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) { // ------------------- std::string str_PhotometricInterpretation = - Header->GetPubElValByNumber(0x0028,0x0004); + Header->GetPubEntryByNumber(0x0028,0x0004); if ( (str_PhotometricInterpretation == "MONOCHROME1 ") || (str_PhotometricInterpretation == "MONOCHROME2 ") ) { @@ -531,12 +531,12 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) { // CreateOrReplaceIfExist ? std::string spp = "3"; // Samples Per Pixel - Header->SetPubElValByNumber(spp,0x0028,0x0002); + Header->SetPubEntryByNumber(spp,0x0028,0x0002); std::string rgb="RGB "; // Photometric Interpretation - Header->SetPubElValByNumber(rgb,0x0028,0x0004); + Header->SetPubEntryByNumber(rgb,0x0028,0x0004); std::string planConfig = "0"; // Planar Configuration - Header->SetPubElValByNumber(planConfig,0x0028,0x0006); + Header->SetPubEntryByNumber(planConfig,0x0028,0x0006); // TODO : Drop Palette Color out of the Header? return lgrTotale; @@ -675,10 +675,10 @@ bool gdcmFile::WriteBase (std::string FileName, FileType type) { std::string rows, columns; if ( Header->GetFileType() == ACR_LIBIDO){ - rows = Header->GetPubElValByNumber(0x0028, 0x0010); - columns = Header->GetPubElValByNumber(0x0028, 0x0011); - Header->SetPubElValByNumber(columns, 0x0028, 0x0010); - Header->SetPubElValByNumber(rows , 0x0028, 0x0011); + rows = Header->GetPubEntryByNumber(0x0028, 0x0010); + columns = Header->GetPubEntryByNumber(0x0028, 0x0011); + Header->SetPubEntryByNumber(columns, 0x0028, 0x0010); + Header->SetPubEntryByNumber(rows , 0x0028, 0x0011); } // ----------------- End of Special Patch ---------------- @@ -691,8 +691,8 @@ bool gdcmFile::WriteBase (std::string FileName, FileType type) { // just after writting if (Header->GetFileType() == ACR_LIBIDO){ - Header->SetPubElValByNumber(rows , 0x0028, 0x0010); - Header->SetPubElValByNumber(columns, 0x0028, 0x0011); + Header->SetPubEntryByNumber(rows , 0x0028, 0x0010); + Header->SetPubEntryByNumber(columns, 0x0028, 0x0011); } // ----------------- End of Special Patch ---------------- @@ -851,7 +851,7 @@ bool gdcmFile::ReadPixelData(void* destination) { // --------------- SingleFrame/Multiframe JPEG Lossless/Lossy/2000 int nb; - std::string str_nb=Header->GetPubElValByNumber(0x0028,0x0100); + std::string str_nb=Header->GetPubEntryByNumber(0x0028,0x0100); if (str_nb == GDCM_UNFOUND ) { nb = 16; } else {