Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/06/03 16:05:23 $
- Version: $Revision: 1.243 $
+ Date: $Date: 2005/06/10 14:05:38 $
+ Version: $Revision: 1.245 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
//-----------------------------------------------------------------------------
-// Refer to Document::CheckSwap()
-//const unsigned int Document::HEADER_LENGTH_TO_READ = 256;
// Refer to Document::SetMaxSizeLoadEntry()
const unsigned int Document::MAX_SIZE_LOAD_ELEMENT_VALUE = 0xfff; // 4096
/**
* \brief Constructor (not to break the API)
- * @param fileName 'Document' (File or DicomDir) to be opened for parsing
+ * @param fileName 'Document' (File or DicomDir) to be open for parsing
*/
Document::Document( std::string const &fileName )
:ElementSet(-1)
IsDocumentAlreadyLoaded = false;
Load(fileName);
-
- // Normaly (?) Fp should be already deleted by CloseFile()
- if ( Fp != 0 )
- delete Fp;
- Fp = 0;
}
/**
* \brief Canonical destructor.
/**
* \brief Loader
- * @param fileName 'Document' (File or DicomDir) to be opened for parsing
+ * @param fileName 'Document' (File or DicomDir) to be open for parsing
* @return false if file cannot be open or no swap info was found,
* or no tag was found.
*/
<< Filename.c_str() << ". New name is :"
<< fileName );
// todo : clean out the 'Document'
- // We should call ClearEntry() on the parent object ?!?
+ // Should we call ClearEntry() on the parent object ?!?
}
Filename = fileName;
if ( strLgrGroup != GDCM_UNFOUND)
{
lgrGroup = atoi(strLgrGroup.c_str());
- Fp->seekg(lgrGroup , std::ios::cur);
+ Fp->seekg(lgrGroup, std::ios::cur);
used = false;
continue;
}
{
if (BinEntry *binEntryPtr = dynamic_cast< BinEntry* >(entry) )
{
- //s << "gdcm::NotLoaded (BinEntry)";
s << GDCM_NOTLOADED;
s << " Ad.:" << (long)entry->GetOffset();
s << " x(" << std::hex << entry->GetOffset() << ")";
s << " x(" << std::hex << entry->GetLength() << ")";
binEntryPtr->SetValue(s.str());
}
- // Be carefull : a BinEntry IS_A ValEntry ...
else if (ValEntry *valEntryPtr = dynamic_cast< ValEntry* >(entry) )
{
- // s << "gdcm::NotLoaded. (ValEntry)";
s << GDCM_NOTLOADED;
s << " Address:" << (long)entry->GetOffset();
s << " Length:" << entry->GetLength();
uint32_t NewInt;
int nbInt;
// When short integer(s) are expected, read and convert the following
- // n *two characters properly i.e. consider them as short integers as
+ // (n * 2) characters properly i.e. consider them as short integers as
// opposed to strings.
// Elements with Value Multiplicity > 1
// contain a set of integers (not a single one)
{
newValue = Util::DicomString(str, length+1);
gdcmWarningMacro("Warning: bad length: " << length <<
- ",For string :" << newValue.c_str());
+ " ,For string :" << newValue.c_str());
// Since we change the length of string update it length
//entry->SetReadLength(length+1);
}