X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirSerie.cxx;h=13c3108059a531afec0558a35deb89000f8ae032;hb=1bae8d2ba47d1b9cc8acfb7b5ab82026e48275dd;hp=ddeb9a08b137d2684414d2e194b830e7cab8d049;hpb=ab0aa4fa11e3ac7ec236d1aceb6f0cf89fe83eae;p=gdcm.git diff --git a/src/gdcmDicomDirSerie.cxx b/src/gdcmDicomDirSerie.cxx index ddeb9a08..13c31080 100644 --- a/src/gdcmDicomDirSerie.cxx +++ b/src/gdcmDicomDirSerie.cxx @@ -3,12 +3,12 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirSerie.cxx,v $ Language: C++ - Date: $Date: 2004/09/23 10:47:10 $ - Version: $Revision: 1.14 $ + Date: $Date: 2004/11/25 15:46:11 $ + Version: $Revision: 1.21 $ 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 @@ -20,36 +20,39 @@ #include "gdcmDicomDirElement.h" #include "gdcmGlobal.h" +namespace gdcm +{ + //----------------------------------------------------------------------------- // Constructor / Destructor /** * \brief Constructor * @param s SQ Item holding the elements related to this "SERIE" part - * @param ptagHT pointer to the HTable (gdcmDicomDirObject needs it - * to build the gdcmDocEntries) + * @param ptagHT pointer to the HTable (DicomDirObject needs it + * to build the DocEntries) */ -gdcmDicomDirSerie::gdcmDicomDirSerie(gdcmSQItem *s, TagDocEntryHT *ptagHT): - gdcmDicomDirObject(ptagHT) +DicomDirSerie::DicomDirSerie(SQItem* s, TagDocEntryHT* ptagHT) : + DicomDirObject(ptagHT) { - docEntries = s->GetDocEntries(); + DocEntries = s->GetDocEntries(); } /** * \brief Constructor - * @param ptagHT pointer to the HTable (gdcmDicomDirObject needs it - * to build the gdcmDocEntries) + * @param ptagHT pointer to the HTable (DicomDirObject needs it + * to build the DocEntries) */ -gdcmDicomDirSerie::gdcmDicomDirSerie(TagDocEntryHT *ptagHT): - gdcmDicomDirObject(ptagHT) +DicomDirSerie::DicomDirSerie(TagDocEntryHT* ptagHT): + DicomDirObject(ptagHT) { } /** * \brief Canonical destructor. */ -gdcmDicomDirSerie::~gdcmDicomDirSerie() +DicomDirSerie::~DicomDirSerie() { - for(ListDicomDirImage::iterator cc = images.begin(); - cc != images.end(); + for(ListDicomDirImage::iterator cc = Images.begin(); + cc != Images.end(); ++cc) { delete *cc; @@ -62,13 +65,13 @@ gdcmDicomDirSerie::~gdcmDicomDirSerie() * \brief Prints the Object * @return */ -void gdcmDicomDirSerie::Print(std::ostream &os) +void DicomDirSerie::Print(std::ostream& os) { os << "SERIE" << std::endl; - gdcmDicomDirObject::Print(os); + DicomDirObject::Print(os); - for(ListDicomDirImage::iterator cc = images.begin(); - cc != images.end(); + for(ListDicomDirImage::iterator cc = Images.begin(); + cc != Images.end(); ++cc) { (*cc)->SetPrintLevel(PrintLevel); @@ -83,27 +86,29 @@ void gdcmDicomDirSerie::Print(std::ostream &os) * \brief Writes the Object * @return */ -void gdcmDicomDirSerie::Write(FILE *fp, FileType t) +void DicomDirSerie::WriteContent(std::ofstream* fp, FileType t) { - gdcmDicomDirObject::Write(fp, t); + DicomDirObject::WriteContent(fp, t); - for(ListDicomDirImage::iterator cc = images.begin();cc!=images.end();++cc) + for(ListDicomDirImage::iterator cc = Images.begin(); + cc!= Images.end(); + ++cc ) { - (*cc)->Write( fp, t ); + (*cc)->WriteContent( fp, t ); } } /** * \brief adds a new Image (with the basic elements) to a partially created DICOMDIR */ -gdcmDicomDirImage * gdcmDicomDirSerie::NewImage() +DicomDirImage* DicomDirSerie::NewImage() { - std::list elemList = - gdcmGlobal::GetDicomDirElements()->GetDicomDirImageElements(); + ListDicomDirImageElem const & elemList = + Global::GetDicomDirElements()->GetDicomDirImageElements(); - gdcmDicomDirImage *st = new gdcmDicomDirImage(PtagHT); + DicomDirImage* st = new DicomDirImage(PtagHT); FillObject(elemList); - images.push_front(st); + Images.push_front(st); return st; } @@ -114,3 +119,6 @@ gdcmDicomDirImage * gdcmDicomDirSerie::NewImage() // Private //----------------------------------------------------------------------------- +} // end namespace gdcm + +