X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFileHelper.cxx;h=ba19abe3c21d58dc76f9404ff4de00fbcdf3e788;hb=6c40186a16e41e7f97357cc0adc4eee44f75e59f;hp=afb5ef92c92233956bc491fe99853369b4dc5cfb;hpb=7be24dfff4577d9d80ebfa864df09788f149f46d;p=gdcm.git diff --git a/src/gdcmFileHelper.cxx b/src/gdcmFileHelper.cxx index afb5ef92..ba19abe3 100644 --- a/src/gdcmFileHelper.cxx +++ b/src/gdcmFileHelper.cxx @@ -4,8 +4,8 @@ Module: $RCSfile: gdcmFileHelper.cxx,v $ Language: C++ - Date: $Date: 2005/12/14 10:02:13 $ - Version: $Revision: 1.86 $ + Date: $Date: 2005/12/15 13:35:38 $ + Version: $Revision: 1.87 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1358,19 +1358,19 @@ void FileHelper::CheckMandatoryElements() } std::string pixelSpacing = FileInternal->GetEntryString(0x0028,0x0030); - if ( pixelSpacing == GDCM_UNKNOWN ) + if ( pixelSpacing == GDCM_UNFOUND ) { pixelSpacing = "1.0\\1.0"; // if missing, Pixel Spacing forced to "1.0\1.0" - CopyMandatoryEntry(0x0028,0x0030,"1.0\\1.0"); + CopyMandatoryEntry(0x0028,0x0030,pixelSpacing); } + // 'Imager Pixel Spacing' : defaulted to 'Pixel Spacing' // --> This one is the *legal* one ! // FIXME : we should write it only when we are *sure* the image comes from - // an imager (see also 0008,0x0064) - + // an imager (see also 0008,0x0064) CheckMandatoryEntry(0x0018,0x1164,pixelSpacing); - + // Samples Per Pixel (type 1) : default to grayscale CheckMandatoryEntry(0x0028,0x0002,"1");