X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirImage.cxx;h=06dde6d533bbc964dad4e54ce265bcf5afeed882;hb=01f14ba7d0d9eee2b8f0a768efd116e26023be12;hp=5a12172ec205491405edcca6737a78b2b94e2da9;hpb=233c8b3ebb1aee6b1be6723d842eb2241b9ffb91;p=gdcm.git diff --git a/src/gdcmDicomDirImage.cxx b/src/gdcmDicomDirImage.cxx index 5a12172e..06dde6d5 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/12/03 17:13:18 $ - Version: $Revision: 1.14 $ + Date: $Date: 2005/10/18 08:35:49 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -17,47 +17,63 @@ =========================================================================*/ #include "gdcmDicomDirImage.h" -#include "gdcmValEntry.h" +#include "gdcmGlobal.h" +#include "gdcmDataEntry.h" namespace gdcm { //----------------------------------------------------------------------------- // Constructor / Destructor /** - * \ingroup DicomDirImage * \brief Constructor - * @param ptagHT pointer to the HTable (DicomDirObject needs it - * to build the DocEntries) + * \note End user must use : DicomDirSerie::NewImage() */ -DicomDirImage::DicomDirImage(): +DicomDirImage::DicomDirImage(bool empty): DicomDirObject() { + if ( !empty ) + { + ListDicomDirImageElem const &elemList = + Global::GetDicomDirElements()->GetDicomDirImageElements(); + FillObject(elemList); + } } + /** - * \ingroup DicomDirImage * \brief Canonical destructor. */ DicomDirImage::~DicomDirImage() { } +//----------------------------------------------------------------------------- +// Public + +//----------------------------------------------------------------------------- +// Protected + +//----------------------------------------------------------------------------- +// Private + //----------------------------------------------------------------------------- // Print /** - * \ingroup DicomDirImage * \brief Prints the Object + * @param os ostream to write to + * @param indent Indentation string to be prepended during printing * @return */ -void DicomDirImage::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) { - if( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 ) + if ( (*i)->GetGroup() == 0x0004 && (*i)->GetElement() == 0x1500 ) { - os << ((ValEntry *)(*i))->GetValue(); //FIXME + if( dynamic_cast(*i) ) + os << (dynamic_cast(*i))->GetString(); } } os << std::endl; @@ -65,15 +81,6 @@ void DicomDirImage::Print(std::ostream &os) DicomDirObject::Print(os); } -//----------------------------------------------------------------------------- -// Public - -//----------------------------------------------------------------------------- -// Protected - -//----------------------------------------------------------------------------- -// Private - //----------------------------------------------------------------------------- } // end namespace gdcm