]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDirSerie.cxx
ENH: update cmakelists accordingly to new ijg architecture
[gdcm.git] / src / gdcmDicomDirSerie.cxx
index 146d1c06ee771e0454d45450c2ac5823073fec1a..62396da10ed4aec928474c606f088a9306420026 100644 (file)
@@ -3,12 +3,12 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/08/01 00:59:21 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2004/10/12 04:35:45 $
+  Version:   $Revision: 1.17 $
                                                                                 
   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
 #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 (gdcmObject 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):
-   gdcmObject(ptagHT)
+DicomDirSerie::DicomDirSerie(SQItem* s, TagDocEntryHT* ptagHT):
+   DicomDirObject(ptagHT)
 {
    docEntries = s->GetDocEntries();
 }
 
 /**
  * \brief  Constructor 
- * @param ptagHT pointer to the HTable (gdcmObject needs it 
- *               to build the gdcmDocEntries)
+ * @param ptagHT pointer to the HTable (DicomDirObject needs it 
+ *               to build the DocEntries)
  */
-gdcmDicomDirSerie::gdcmDicomDirSerie(TagDocEntryHT *ptagHT):
-   gdcmObject(ptagHT)
+DicomDirSerie::DicomDirSerie(TagDocEntryHT* ptagHT):
+   DicomDirObject(ptagHT)
 {
 }
 /**
  * \brief   Canonical destructor.
  */
-gdcmDicomDirSerie::~gdcmDicomDirSerie() 
+DicomDirSerie::~DicomDirSerie() 
 {
    for(ListDicomDirImage::iterator cc = images.begin();
                                    cc != images.end();
@@ -62,10 +65,10 @@ gdcmDicomDirSerie::~gdcmDicomDirSerie()
  * \brief   Prints the Object
  * @return
  */ 
-void gdcmDicomDirSerie::Print(std::ostream &os)
+void DicomDirSerie::Print(std::ostream& os)
 {
    os << "SERIE" << std::endl;
-   gdcmObject::Print(os);
+   DicomDirObject::Print(os);
 
    for(ListDicomDirImage::iterator cc = images.begin();
                                    cc != images.end();
@@ -78,15 +81,30 @@ void gdcmDicomDirSerie::Print(std::ostream &os)
 
 //-----------------------------------------------------------------------------
 // Public
+
+/**
+ * \brief   Writes the Object
+ * @return
+ */ 
+void DicomDirSerie::Write(FILE* fp, FileType t)
+{
+   DicomDirObject::Write(fp, t);
+
+   for(ListDicomDirImage::iterator cc = images.begin();cc!=images.end();++cc)
+   {
+      (*cc)->Write( fp, t );
+   }
+}
+
 /**
  * \brief   adds a new Image (with the basic elements) to a partially created DICOMDIR
  */
-gdcmDicomDirImage * gdcmDicomDirSerie::NewImage()
+DicomDirImage* DicomDirSerie::NewImage()
 {
-   std::list<gdcmElement> elemList = 
-      gdcmGlobal::GetDicomDirElements()->GetDicomDirImageElements();
+   std::list<Element> elemList = 
+      Global::GetDicomDirElements()->GetDicomDirImageElements();
 
-   gdcmDicomDirImage *st = new gdcmDicomDirImage(PtagHT);
+   DicomDirImage* st = new DicomDirImage(PtagHT);
    FillObject(elemList);
    images.push_front(st);
 
@@ -99,3 +117,6 @@ gdcmDicomDirImage * gdcmDicomDirSerie::NewImage()
 // Private
 
 //-----------------------------------------------------------------------------
+} // end namespace gdcm
+
+