X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmDicomDirImage.cxx;h=6ad054f8c9d6d72e423dde6c17cbfcbe867fed4b;hb=f5a3357d5243ea55d994eda5ff406edbdbe5077c;hp=f14f92bc71656889a3a3770295633033ddeb2a6a;hpb=ab0aa4fa11e3ac7ec236d1aceb6f0cf89fe83eae;p=gdcm.git diff --git a/src/gdcmDicomDirImage.cxx b/src/gdcmDicomDirImage.cxx index f14f92bc..6ad054f8 100644 --- a/src/gdcmDicomDirImage.cxx +++ b/src/gdcmDicomDirImage.cxx @@ -3,12 +3,12 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirImage.cxx,v $ Language: C++ - Date: $Date: 2004/09/23 10:47:10 $ - Version: $Revision: 1.10 $ + Date: $Date: 2005/01/20 16:16:42 $ + Version: $Revision: 1.19 $ 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 @@ -18,60 +18,56 @@ #include "gdcmDicomDirImage.h" #include "gdcmValEntry.h" +#include "gdcmGlobal.h" + +namespace gdcm +{ //----------------------------------------------------------------------------- // Constructor / Destructor - /** - * \ingroup gdcmDicomDirImage * \brief Constructor - * @param s SQ Item holding the elements - * @param ptagHT pointer to the HTable (gdcmDicomDirObject needs it - * to build the gdcmDocEntries) */ -gdcmDicomDirImage::gdcmDicomDirImage(gdcmSQItem *s, TagDocEntryHT *ptagHT): - gdcmDicomDirObject(ptagHT) +DicomDirImage::DicomDirImage(bool empty): + DicomDirObject() { - docEntries = s->GetDocEntries(); + if( !empty ) + { + ListDicomDirImageElem const &elemList = + Global::GetDicomDirElements()->GetDicomDirImageElements(); + FillObject(elemList); + } } /** - * \ingroup gdcmDicomDirImage - * \brief Constructor - * @param ptagHT pointer to the HTable (gdcmDicomDirObject needs it - * to build the gdcmDocEntries) - */ -gdcmDicomDirImage::gdcmDicomDirImage(TagDocEntryHT *ptagHT): - gdcmDicomDirObject(ptagHT) -{ -} -/** - * \ingroup gdcmDicomDirImage * \brief Canonical destructor. */ -gdcmDicomDirImage::~gdcmDicomDirImage() +DicomDirImage::~DicomDirImage() { } //----------------------------------------------------------------------------- // Print /** - * \ingroup gdcmDicomDirImage * \brief Prints the Object + * @param os ostream to write to + * @param indent indent * @return */ -void gdcmDicomDirImage::Print(std::ostream &os) +void DicomDirImage::Print(std::ostream &os, std::string const & ) { os << "IMAGE : "; - for(ListDocEntry::iterator i=docEntries.begin();i!=docEntries.end();++i) + for(ListDocEntry::iterator i = DocEntries.begin(); + i!= DocEntries.end(); + ++i) { if( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 ) { - os << ((gdcmValEntry *)(*i))->GetValue(); //FIXME + os << (dynamic_cast(*i))->GetValue(); //FIXME } } os << std::endl; - gdcmDicomDirObject::Print(os); + DicomDirObject::Print(os); } //----------------------------------------------------------------------------- @@ -84,3 +80,5 @@ void gdcmDicomDirImage::Print(std::ostream &os) // Private //----------------------------------------------------------------------------- +} // end namespace gdcm +