]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDirPatient.cxx
ENH: Who would have bet ! Some cosmetic cleanups
[gdcm.git] / src / gdcmDicomDirPatient.cxx
index 33ae75b94f4b49d48789b20200f548e947b19ca7..3cc33bc7e98ddddfc8203582c7258948952e878c 100644 (file)
@@ -1,5 +1,21 @@
-// gdcmDicomDirPatient.cxx
-//-----------------------------------------------------------------------------
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: gdcmDicomDirPatient.cxx,v $
+  Language:  C++
+  Date:      $Date: 2004/08/01 02:39:09 $
+  Version:   $Revision: 1.10 $
+                                                                                
+  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.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
+
 #include "gdcmDicomDirPatient.h"
 #include "gdcmDicomDirElement.h"
 #include "gdcmGlobal.h"
@@ -18,7 +34,12 @@ gdcmDicomDirPatient::gdcmDicomDirPatient(gdcmSQItem *s, TagDocEntryHT *ptagHT):
 {
    docEntries = s->GetDocEntries();
 }
-
+/**
+ * \ingroup gdcmDicomDirPatient
+ * \brief   Constructor
+ * @param ptagHT pointer to the HTable (gdcmObject needs it 
+ *               to build the gdcmHeaderEntries)
+ */
 gdcmDicomDirPatient::gdcmDicomDirPatient(TagDocEntryHT *ptagHT):
    gdcmObject(ptagHT)
 {
@@ -29,7 +50,8 @@ gdcmDicomDirPatient::gdcmDicomDirPatient(TagDocEntryHT *ptagHT):
  */
 gdcmDicomDirPatient::~gdcmDicomDirPatient() 
 {
-   for(ListDicomDirStudy::iterator cc = studies.begin();cc != studies.end();++cc)
+   for(ListDicomDirStudy::iterator cc = studies.begin();
+                                   cc != studies.end(); ++cc)
    {
       delete *cc;
    }
@@ -44,12 +66,13 @@ gdcmDicomDirPatient::~gdcmDicomDirPatient()
  */ 
 void gdcmDicomDirPatient::Print(std::ostream &os)
 {
-   os<<"PATIENT"<<std::endl;
+   os << "PATIENT" << std::endl;
    gdcmObject::Print(os);
 
-   for(ListDicomDirStudy::iterator cc = studies.begin();cc!=studies.end();++cc)
+   for(ListDicomDirStudy::iterator cc = studies.begin();
+                                   cc != studies.end(); ++cc)
    {
-      (*cc)->SetPrintLevel(printLevel);
+      (*cc)->SetPrintLevel(PrintLevel);
       (*cc)->Print(os);
    }
 }
@@ -62,17 +85,16 @@ void gdcmDicomDirPatient::Print(std::ostream &os)
  * \brief   adds a new Patient at the begining of the PatientList
  *          of a partially created DICOMDIR
  */
-gdcmDicomDirStudy * gdcmDicomDirPatient::NewStudy(void) {
-   std::list<gdcmElement> elemList;   
-   elemList=gdcmGlobal::GetDicomDirElements()->GetDicomDirStudyElements();
+gdcmDicomDirStudy * gdcmDicomDirPatient::NewStudy()
+{
+   std::list<gdcmElement> elemList = 
+      gdcmGlobal::GetDicomDirElements()->GetDicomDirStudyElements();
       
-   gdcmDicomDirStudy *st = new gdcmDicomDirStudy( ptagHT);
+   gdcmDicomDirStudy *st = new gdcmDicomDirStudy( PtagHT );
    st->FillObject(elemList);
 
    studies.push_front(st);
    return st; 
-
-  
 }   
 
 //-----------------------------------------------------------------------------