Program: gdcm
Module: $RCSfile: gdcmSeqEntry.cxx,v $
Language: C++
- Date: $Date: 2004/09/13 12:10:53 $
- Version: $Revision: 1.27 $
+ Date: $Date: 2004/09/27 08:39:07 $
+ Version: $Revision: 1.30 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
- http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* \ingroup gdcmSeqEntry
* \brief Constructor from a given gdcmSeqEntry
*/
-gdcmSeqEntry::gdcmSeqEntry(gdcmDictEntry* e, int depth)
+gdcmSeqEntry::gdcmSeqEntry( gdcmDictEntry* e )
: gdcmDocEntry(e)
{
UsableLength = 0;
ReadLength = 0xffffffff;
- SQDepthLevel = depth;
+ SQDepthLevel = -1;
delimitor_mode = false;
seq_term = NULL;
/**
* \brief canonical Printer
*/
-void gdcmSeqEntry::Print(std::ostream &os)
+void gdcmSeqEntry::Print( std::ostream &os )
{
// First, Print the Dicom Element itself.
SetPrintLevel(2);
// at end, print the sequence terminator item, if any
if (delimitor_mode) {
- for (int i=0;i<SQDepthLevel+1;i++)
+ for ( int i = 0; i < SQDepthLevel; i++ )
+ {
os << " | " ;
- if (seq_term != NULL) {
+ }
+ if (seq_term != NULL)
+ {
seq_term->Print(os);
os << std::endl;
}
else
- // fusible
+ {
+ // fuse
os << " -------------- should have a sequence terminator item";
+ }
}
}
/*
* \brief canonical Writer
*/
-void gdcmSeqEntry::Write(FILE *fp, FileType filetype)
+void gdcmSeqEntry::Write(FILE* fp, FileType filetype)
{
uint16_t seq_term_gr = 0xfffe;
uint16_t seq_term_el = 0xe0dd;
* Returns the last item when argument is bigget than the total
* item number.
*/
-gdcmSQItem *gdcmSeqEntry::GetSQItemByOrdinalNumber(int nb)
+gdcmSQItem* gdcmSeqEntry::GetSQItemByOrdinalNumber(int nb)
{
if (nb<0)
return (*(items.begin()));