X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmSeqEntry.cxx;h=9e510814df433678865a4f339247394f51e68858;hb=d1c68c2c2ae9fadf927053150f7fbc625a7c7366;hp=feadac76014a59750648d2d726136533ce882010;hpb=4491b768d9529a24608e44d6ef77dc235d37dbb7;p=gdcm.git diff --git a/src/gdcmSeqEntry.cxx b/src/gdcmSeqEntry.cxx index feadac76..9e510814 100644 --- a/src/gdcmSeqEntry.cxx +++ b/src/gdcmSeqEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmSeqEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/31 12:19:34 $ - Version: $Revision: 1.51 $ + Date: $Date: 2005/02/01 10:29:56 $ + Version: $Revision: 1.52 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -29,7 +29,6 @@ namespace gdcm { - //----------------------------------------------------------------------------- // Constructor / Destructor /** @@ -78,49 +77,6 @@ SeqEntry::~SeqEntry() } } -//----------------------------------------------------------------------------- -// Print -/** - * \brief canonical Printer - */ -void SeqEntry::Print( std::ostream &os, std::string const & ) -{ - // First, Print the Dicom Element itself. - os << "S "; - DocEntry::Print(os); - os << std::endl; - - if (GetReadLength() == 0) - return; - - // Then, Print each SQ Item - for(ListSQItem::iterator cc = Items.begin(); cc != Items.end(); ++cc) - { - (*cc)->SetPrintLevel(PrintLevel); - (*cc)->Print(os); - } - - // at end, print the sequence terminator item, if any - if (DelimitorMode) - { - for ( int i = 0; i < SQDepthLevel; i++ ) - { - os << " | " ; - } - if (SeqTerm != NULL) - { - SeqTerm->SetPrintLevel(PrintLevel); - SeqTerm->Print(os); - os << std::endl; - } - else - { - // fuse - gdcmVerboseMacro(" -------- should have a sequence terminator item"); - } - } -} - //----------------------------------------------------------------------------- // Public /* @@ -206,16 +162,20 @@ SQItem *SeqEntry::GetSQItem(int nb) return *(Items.end()); } -/// \brief returns the number of SQItems within the current Sequence +/** + * \brief returns the number of SQItems within the current Sequence + */ unsigned int SeqEntry::GetNumberOfSQItems() { return Items.size(); } -/// \brief adds the passed ITEM to the ITEM chained List for this SeQuence. -/// @param sqItem SQItem to be pushed back in the SeqEntry -/// @param itemNumber ordinal number of the SQItem -/// \note NOT end-user intendend method ! +/** + * \brief adds the passed ITEM to the ITEM chained List for this SeQuence. + * @param sqItem SQItem to be pushed back in the SeqEntry + * @param itemNumber ordinal number of the SQItem + * \note NOT end-user intendend method ! + */ void SeqEntry::AddSQItem(SQItem *sqItem, int itemNumber) { // FIXME : SQItemNumber is supposed to be the ordinal number of the SQItem @@ -235,5 +195,47 @@ void SeqEntry::AddSQItem(SQItem *sqItem, int itemNumber) // Private //----------------------------------------------------------------------------- -} // end namespace gdcm +// Print +/** + * \brief canonical Printer + */ +void SeqEntry::Print( std::ostream &os, std::string const & ) +{ + // First, Print the Dicom Element itself. + os << "S "; + DocEntry::Print(os); + os << std::endl; + if (GetReadLength() == 0) + return; + + // Then, Print each SQ Item + for(ListSQItem::iterator cc = Items.begin(); cc != Items.end(); ++cc) + { + (*cc)->SetPrintLevel(PrintLevel); + (*cc)->Print(os); + } + + // at end, print the sequence terminator item, if any + if (DelimitorMode) + { + for ( int i = 0; i < SQDepthLevel; i++ ) + { + os << " | " ; + } + if (SeqTerm != NULL) + { + SeqTerm->SetPrintLevel(PrintLevel); + SeqTerm->Print(os); + os << std::endl; + } + else + { + // fuse + gdcmVerboseMacro(" -------- should have a sequence terminator item"); + } + } +} + +//----------------------------------------------------------------------------- +} // end namespace gdcm