Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/10 17:17:52 $
- Version: $Revision: 1.171 $
+ Date: $Date: 2005/01/11 00:21:48 $
+ Version: $Revision: 1.172 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// \todo check the result
Fp->read((char*)a, l);
- if( Fp->fail() || Fp->eof()) //Fp->gcount() == 1
+ if( Fp->fail() || Fp->eof())
{
delete[] a;
return;
a=( ((a<< 8) & 0xff00ff00) | ((a>>8) & 0x00ff00ff) );
break;
default :
- //std::cout << "swapCode= " << SwapCode << std::endl;
- gdcmErrorMacro( "Unset swap code");
+ gdcmErrorMacro( "Unset swap code:" << SwapCode );
a = 0;
}
return a;
else
{
// fusible
- std::cout<< "MaxSizeLoadEntry exceeded, neither a BinEntry "
- << "nor a ValEntry ?! Should never print that !" << std::endl;
+ gdcmErrorMacro( "MaxSizeLoadEntry exceeded, neither a BinEntry "
+ << "nor a ValEntry ?! Should never print that !" );
}
// to be sure we are at the end of the value ...
if( length % 2 )
{
newValue = Util::DicomString(str, length+1);
- gdcmVerboseMacro("Warning: bad length: " << length );
- gdcmVerboseMacro("For string :" << newValue.c_str());
+ gdcmVerboseMacro("Warning: bad length: " << length <<
+ ",For string :" << newValue.c_str());
// Since we change the length of string update it length
//entry->SetReadLength(length+1);
}
if ( ValEntry *valEntry = dynamic_cast<ValEntry* >(entry) )
{
- if ( Fp->fail() || Fp->eof())//Fp->gcount() == 1
+ if ( Fp->fail() || Fp->eof())
{
- gdcmVerboseMacro( "Unread element value");
+ gdcmVerboseMacro("Unread element value");
valEntry->SetValue(GDCM_UNREAD);
return;
}
// and the dictionary entry depending on them.
uint16_t correctGroup = SwapShort( entry->GetGroup() );
uint16_t correctElem = SwapShort( entry->GetElement() );
- DictEntry *newTag = GetDictEntry( correctGroup,
- correctElem );
+ DictEntry *newTag = GetDictEntry( correctGroup, correctElem );
if ( !newTag )
{
// This correct tag is not in the dictionary. Create a new one.
std::string Document::FindDocEntryVR()
{
if ( Filetype != ExplicitVR )
- return(GDCM_UNKNOWN);
+ return GDCM_UNKNOWN;
long positionOnEntry = Fp->tellg();
// Warning: we believe this is explicit VR (Value Representation) because
if( !CheckDocEntryVR(vr) )
{
Fp->seekg(positionOnEntry, std::ios::beg);
- return(GDCM_UNKNOWN);
+ return GDCM_UNKNOWN;
}
- return(vr);
+ return vr;
}
/**