From 4ec737aa29e1414e6f0553b581f50e96d2110912 Mon Sep 17 00:00:00 2001 From: jpr Date: Mon, 20 Aug 2007 13:24:04 +0000 Subject: [PATCH] Add methods to get number of objets --- src/gdcmDicomDir.h | 8 +++++--- src/gdcmDicomDirPatient.h | 9 +++++---- src/gdcmDicomDirSerie.h | 11 +++++++---- src/gdcmDicomDirStudy.h | 12 ++++++++---- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index ebe30795..d13b038a 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.h,v $ Language: C++ - Date: $Date: 2007/05/23 14:18:08 $ - Version: $Revision: 1.79 $ + Date: $Date: 2007/08/20 13:24:04 $ + Version: $Revision: 1.80 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -88,7 +88,9 @@ public: DicomDirPatient *GetFirstPatient(); DicomDirPatient *GetNextPatient(); - + /// returns the number of Patients currently held in the gdcm::DicomDir + int GetNumberOfPatients() { return Patients.size();} + // Parsing void ParseDirectory(); diff --git a/src/gdcmDicomDirPatient.h b/src/gdcmDicomDirPatient.h index 9b6dfaa9..a33e9805 100644 --- a/src/gdcmDicomDirPatient.h +++ b/src/gdcmDicomDirPatient.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirPatient.h,v $ Language: C++ - Date: $Date: 2007/07/26 08:36:49 $ - Version: $Revision: 1.32 $ + Date: $Date: 2007/08/20 13:24:04 $ + Version: $Revision: 1.33 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -45,7 +45,7 @@ public: void WriteContent(std::ofstream *fp, FileType t, bool insideMetaElements); // Patient methods - /// \brief Adds a new gdcmDicomDirStudy to the Patient + /// \brief Adds a new gdcm::DicomDirStudy to the Patient void AddStudy(DicomDirStudy *obj) { Studies.push_back(obj); } DicomDirStudy *NewStudy(); void ClearStudy(); @@ -53,7 +53,8 @@ public: DicomDirStudy *GetFirstStudy(); DicomDirStudy *GetNextStudy(); DicomDirStudy *GetLastStudy(); - + /// returns the number of Studies currently held in the gdcm::DicomDirPatient + int GetNumberOfStudies() { return Studies.size();} virtual void Copy(DocEntrySet *set); protected: diff --git a/src/gdcmDicomDirSerie.h b/src/gdcmDicomDirSerie.h index e2fa2e8f..4c098802 100644 --- a/src/gdcmDicomDirSerie.h +++ b/src/gdcmDicomDirSerie.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirSerie.h,v $ Language: C++ - Date: $Date: 2007/07/26 08:36:49 $ - Version: $Revision: 1.35 $ + Date: $Date: 2007/08/20 13:24:04 $ + Version: $Revision: 1.36 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -53,7 +53,9 @@ public: DicomDirImage *GetFirstImage(); DicomDirImage *GetNextImage(); - + /// returns the number of Images currently held in the gdcm::DicomDirSerie + int GetNumberOfImages() { return Images.size();} + // 'Private' methods (For SIEMENS 'CSA non image') DicomDirPrivate *NewPrivate(); /// Add a new gdcm::DicomDirPrivate to the Serie @@ -62,7 +64,8 @@ public: DicomDirPrivate *GetFirstPrivate(); DicomDirPrivate *GetNextPrivate(); - + /// returns the number of 'Privates' currently held in the gdcm::DicomDirSerie + int GetNumberOfPrivates() { return Privates.size();} virtual void Copy(DocEntrySet *set); diff --git a/src/gdcmDicomDirStudy.h b/src/gdcmDicomDirStudy.h index 17b4bb44..56dcb3cf 100644 --- a/src/gdcmDicomDirStudy.h +++ b/src/gdcmDicomDirStudy.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.h,v $ Language: C++ - Date: $Date: 2007/07/26 08:36:49 $ - Version: $Revision: 1.34 $ + Date: $Date: 2007/08/20 13:24:04 $ + Version: $Revision: 1.35 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -59,7 +59,9 @@ public: DicomDirSerie *GetFirstSerie(); DicomDirSerie *GetNextSerie(); DicomDirSerie *GetLastSerie(); - + /// returns the number of Series currently held in the gdcm::DicomDirStudy + int GetNumberOfSeries() { return Series.size();} + // 'Visit' methods DicomDirVisit *NewVisit(); /// Adds a gdcm::DicomDirVisit to a gdcm::DicomDirStudy @@ -68,7 +70,9 @@ public: DicomDirVisit *GetFirstVisit(); DicomDirVisit *GetNextVisit(); DicomDirVisit *GetLastVisit(); - + /// returns the number of Visit currently held in the gdcm::DicomDirStudy + int GetNumberOfVisits() { return Visits.size();} + // for future use (Full DICOMDIR) /* DicomDirResult *GetFirstResult(); -- 2.48.1