X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirStudy.cxx;h=4bb284ff46533a7796a3f7155399f3f706c71385;hb=6383e4f567672c46fefb1c67c0bb821dee5b8bff;hp=8975dabdb0d4b825e69296f6aa358bba45aa75d4;hpb=ce8913daafe02955368fd2f07e777e86824467cc;p=gdcm.git diff --git a/src/gdcmDicomDirStudy.cxx b/src/gdcmDicomDirStudy.cxx index 8975dabd..4bb284ff 100644 --- a/src/gdcmDicomDirStudy.cxx +++ b/src/gdcmDicomDirStudy.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.cxx,v $ Language: C++ - Date: $Date: 2005/01/25 15:44:23 $ - Version: $Revision: 1.32 $ + Date: $Date: 2005/06/24 10:55:58 $ + Version: $Revision: 1.37 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,11 +28,12 @@ namespace gdcm // Constructor / Destructor /** * \brief Constructor + * \note End user must use : DicomDirPatient::NewStudy() */ -DicomDirStudy::DicomDirStudy(bool empty): - DicomDirObject() +DicomDirStudy::DicomDirStudy(bool empty) + :DicomDirObject() { - if( !empty ) + if ( !empty ) { ListDicomDirStudyElem const &elemList = Global::GetDicomDirElements()->GetDicomDirStudyElements(); @@ -48,28 +49,6 @@ DicomDirStudy::~DicomDirStudy() ClearSerie(); } -//----------------------------------------------------------------------------- -// Print -/** - * \brief Prints the Object - * @param os ostream to write to - * @param indent Indentation string to be prepended during printing - * @return - */ -void DicomDirStudy::Print(std::ostream &os, std::string const & ) -{ - os << "STUDY" << std::endl; - DicomDirObject::Print(os); - - for(ListDicomDirSerie::iterator cc = Series.begin(); - cc != Series.end(); - ++cc) - { - (*cc)->SetPrintLevel(PrintLevel); - (*cc)->Print(os); - } -} - //----------------------------------------------------------------------------- // Public /** @@ -91,12 +70,12 @@ void DicomDirStudy::WriteContent(std::ofstream *fp, FileType t) } /** - * \brief adds a new Serie at the begining of the SerieList + * \brief adds a new Serie at the beginning of the SerieList * of a partially created DICOMDIR */ DicomDirSerie *DicomDirStudy::NewSerie() { - DicomDirSerie* st = new DicomDirSerie(); + DicomDirSerie *st = new DicomDirSerie(); Series.push_back(st); return st; } @@ -164,5 +143,26 @@ DicomDirSerie *DicomDirStudy::GetLastSerie() // Private //----------------------------------------------------------------------------- -} // end namespace gdcm +// Print +/** + * \brief Prints the Object + * @param os ostream to write to + * @param indent Indentation string to be prepended during printing + * @return + */ +void DicomDirStudy::Print(std::ostream &os, std::string const & ) +{ + os << "STUDY" << std::endl; + DicomDirObject::Print(os); + for(ListDicomDirSerie::iterator cc = Series.begin(); + cc != Series.end(); + ++cc) + { + (*cc)->SetPrintLevel(PrintLevel); + (*cc)->Print(os); + } +} + +//----------------------------------------------------------------------------- +} // end namespace gdcm