Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2005/10/18 19:54:26 $
- Version: $Revision: 1.278 $
+ Date: $Date: 2005/10/19 12:01:51 $
+ Version: $Revision: 1.282 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
else
{
- gdcmWarningMacro( "Unfound Pixel Spacing (0018,1164)" );
+ gdcmWarningMacro( "Unfound Imager Pixel Spacing (0018,1164)" );
}
/* const std::string &strImagerPixelSpacing = GetEntryString(0x0018,0x1164);
if ( strImagerPixelSpacing != GDCM_UNFOUND )
void File::AddAnonymizeElement (uint16_t group, uint16_t elem,
std::string const &value)
{
- Element el;
+ DicomElement el;
el.Group = group;
el.Elem = elem;
el.Value = value;
itemTagGroup = ReadInt16();
itemTagElem = ReadInt16();
}
- catch ( FormatError /*e*/ )
+ catch ( FormatError )
{
- //std::cerr << e << std::endl;
+ gdcmErrorMacro( "Can not read tag for "
+ << " We should have found tag ("
+ << DictEntry::TranslateToKey(testGroup,testElem) << ")"
+ ) ;
+
return false;
}
if ( itemTagGroup != testGroup || itemTagElem != testElem )
{
- gdcmWarningMacro( "Wrong Item Tag found:"
+ gdcmErrorMacro( "Wrong Item Tag found:"
<< " We should have found tag ("
- << std::hex << testGroup << "," << testElem << ")" << std::endl
+ << DictEntry::TranslateToKey(testGroup,testElem) << ")" << std::endl
<< " but instead we encountered tag ("
- << std::hex << itemTagGroup << "," << itemTagElem << ")"
- << " at address: " << " 0x(" << (unsigned int)currentPosition << ")"
+ << DictEntry::TranslateToKey(itemTagGroup,itemTagElem) << ")"
+ << " at address: " << " 0x(" << std::hex
+ << (unsigned int)currentPosition << std::dec << ")"
) ;
Fp->seekg(positionOnEntry, std::ios::beg);
if ( !ReadTag(testGroup, testElem) )
{
+ gdcmErrorMacro( "ReadTag did not succeed for ("
+ << DictEntry::TranslateToKey(testGroup,testElem)
+ << ")..." );
return 0;
}
//// Then read the associated Item Length
long currentPosition = Fp->tellg();
uint32_t itemLength = ReadInt32();
- {
- gdcmWarningMacro( "Basic Item Length is: "
- << itemLength << std::endl
+ gdcmDebugMacro( "Basic Item Length is: " << itemLength
<< " at address: " << std::hex << (unsigned int)currentPosition);
- }
return itemLength;
}