X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirImage.cxx;h=6ad054f8c9d6d72e423dde6c17cbfcbe867fed4b;hb=f5a3357d5243ea55d994eda5ff406edbdbe5077c;hp=ba2134ab151f95aad522a223dff78aec1f87d12b;hpb=8a3dd7efbcb545e7ed308eb7334b1e6dbbf40923;p=gdcm.git diff --git a/src/gdcmDicomDirImage.cxx b/src/gdcmDicomDirImage.cxx index ba2134ab..6ad054f8 100644 --- a/src/gdcmDicomDirImage.cxx +++ b/src/gdcmDicomDirImage.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirImage.cxx,v $ Language: C++ - Date: $Date: 2004/10/25 03:35:19 $ - Version: $Revision: 1.13 $ + 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 @@ -18,37 +18,27 @@ #include "gdcmDicomDirImage.h" #include "gdcmValEntry.h" +#include "gdcmGlobal.h" namespace gdcm { //----------------------------------------------------------------------------- // Constructor / Destructor - /** - * \ingroup DicomDirImage * \brief Constructor - * @param s SQ Item holding the elements - * @param ptagHT pointer to the HTable (DicomDirObject needs it - * to build the DocEntries) */ -DicomDirImage::DicomDirImage(SQItem *s, TagDocEntryHT *ptagHT): - DicomDirObject(ptagHT) +DicomDirImage::DicomDirImage(bool empty): + DicomDirObject() { - DocEntries = s->GetDocEntries(); + if( !empty ) + { + ListDicomDirImageElem const &elemList = + Global::GetDicomDirElements()->GetDicomDirImageElements(); + FillObject(elemList); + } } /** - * \ingroup DicomDirImage - * \brief Constructor - * @param ptagHT pointer to the HTable (DicomDirObject needs it - * to build the DocEntries) - */ -DicomDirImage::DicomDirImage(TagDocEntryHT *ptagHT): - DicomDirObject(ptagHT) -{ -} -/** - * \ingroup DicomDirImage * \brief Canonical destructor. */ DicomDirImage::~DicomDirImage() @@ -58,11 +48,12 @@ DicomDirImage::~DicomDirImage() //----------------------------------------------------------------------------- // Print /** - * \ingroup DicomDirImage * \brief Prints the Object + * @param os ostream to write to + * @param indent indent * @return */ -void DicomDirImage::Print(std::ostream &os) +void DicomDirImage::Print(std::ostream &os, std::string const & ) { os << "IMAGE : "; for(ListDocEntry::iterator i = DocEntries.begin(); @@ -71,7 +62,7 @@ void DicomDirImage::Print(std::ostream &os) { if( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 ) { - os << ((ValEntry *)(*i))->GetValue(); //FIXME + os << (dynamic_cast(*i))->GetValue(); //FIXME } } os << std::endl;