Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/12 17:10:15 $
- Version: $Revision: 1.184 $
+ Date: $Date: 2005/01/13 09:23:27 $
+ Version: $Revision: 1.187 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Fp = new std::ifstream(Filename.c_str(), std::ios::in | std::ios::binary);
if( ! *Fp )
{
- gdcmVerboseMacro( "Cannot open file: " << Filename.c_str());
+ gdcmDebugMacro( "Cannot open file: " << Filename.c_str());
delete Fp;
Fp = 0;
return 0;
* \brief Loads the element while preserving the current
* underlying file position indicator as opposed to
* to LoadDocEntry that modifies it.
- * @param entry Header Entry whose value shall be loaded.
+ * @param entry Header Entry whose value will be loaded.
* @return
*/
void Document::LoadDocEntrySafe(DocEntry *entry)
void Document::FindDocEntryLength( DocEntry *entry )
throw ( FormatError )
{
- uint16_t element = entry->GetElement();
std::string vr = entry->GetVR();
uint16_t length16;
* whatever Transfer Syntax is
* @return no return
*/
-void Document::HandleOutOfGroup0002(uint16_t group)
+void Document::HandleOutOfGroup0002(uint16_t &group, uint16_t &elem)
{
// Endian reversion. Some files contain groups of tags with reversed endianess.
if ( !Group0002Parsed && group != 0x0002)
gdcmVerboseMacro("Transfer Syntax Name = ["
<< GetTransferSyntaxName() << "]" );
SwitchByteSwapCode();
+ group = SwapShort(group);
+ elem = SwapShort(elem);
}
}
}
// In 'true DICOM' files Group 0002 is always little endian
if ( HasDCMPreamble )
- HandleOutOfGroup0002(group);
+ HandleOutOfGroup0002(group, elem);
std::string vr = FindDocEntryVR();
std::string realVR = vr;