Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
- Date: $Date: 2004/10/25 03:35:20 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2004/11/04 15:08:50 $
+ Version: $Revision: 1.35 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
-
//-----------------------------------------------------------------------------
// Constructor / Destructor
/**
cc != DocEntries.end();
++cc)
{
- delete (*cc);
+ delete *cc;
}
DocEntries.clear();
}
s << " | " ;
}
}
- std::cout << s.str() << " --- SQItem number " << SQItemNumber << std::endl;
+ //std::cout << s.str() << " --- SQItem number " << SQItemNumber << std::endl;
for (ListDocEntry::iterator i = DocEntries.begin();
i != DocEntries.end();
++i)
*/
void SQItem::Write(std::ofstream* fp, FileType filetype)
{
+ int j;
uint16_t item[4] = { 0xfffe, 0xe000, 0xffff, 0xffff };
uint16_t itemt[4]= { 0xfffe, 0xe00d, 0xffff, 0xffff };
//we force the writting of an 'Item' Start Element
// because we want to write the Item as a 'no Length' item
- fp->write((char*)&item[0],8); // fffe e000 ffff ffff
+ for(j=0;j<4;++j)
+ {
+ binary_write( *fp, item[j]); // fffe e000 ffff ffff
+ }
for (ListDocEntry::iterator i = DocEntries.begin();
i != DocEntries.end();
//we force the writting of an 'Item Delimitation' item
// because we wrote the Item as a 'no Length' item
- fp->write((char*)&itemt[0],8); // fffe e000 ffff ffff
-
+ for(j=0;j<4;++j)
+ {
+ binary_write( *fp, itemt[j]); // fffe e000 ffff ffff
+ }
+
}
//-----------------------------------------------------------------------------
Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
// if the invoked (group,elem) doesn't exist inside the Dictionary
// we create a VirtualDictEntry
- DictEntry *dictEntry = pubDict->GetDictEntryByNumber(group,
- element);
+ DictEntry *dictEntry = pubDict->GetDictEntryByNumber(group, element);
if (dictEntry == NULL)
{
dictEntry =
Global::GetDicts()->NewVirtualDictEntry(group, element,
- "UN", "??", "??");
+ "UN", "??", "??");
}
// we assume the constructor didn't fail
entry = new ValEntry(dictEntry);