X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirStudy.h;h=4b4d12e6f9a1a993ce2eb7617ec2b8c9a912fc3e;hb=bd7bec4c367d671a9da358584e98a8ec29bb641e;hp=75dbfa862bf158e1caf7df15d37280adfe511991;hpb=30d2b02b938fe912d866b40ca2b9842961481ab2;p=gdcm.git diff --git a/src/gdcmDicomDirStudy.h b/src/gdcmDicomDirStudy.h index 75dbfa86..4b4d12e6 100644 --- a/src/gdcmDicomDirStudy.h +++ b/src/gdcmDicomDirStudy.h @@ -1,48 +1,121 @@ -// gdcmDicomDirStudy.h -//----------------------------------------------------------------------------- -#ifndef GDCMDICOMDIRSTUDY_H -#define GDCMDICOMDIRSTUDY_H +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmDicomDirStudy.h,v $ + Language: C++ + Date: $Date: 2007/08/29 15:30:49 $ + Version: $Revision: 1.37 $ + + 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.html 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 "gdcmObject.h" -#include "gdcmDicomDirSerie.h" +#ifndef _GDCMDICOMDIRSTUDY_H_ +#define _GDCMDICOMDIRSTUDY_H_ -//----------------------------------------------------------------------------- -typedef std::list ListDicomDirSerie; +#include "gdcmDicomDirObject.h" +namespace GDCM_NAME_SPACE +{ +class DicomDirSerie; +class DicomDirVisit; //----------------------------------------------------------------------------- -class GDCM_EXPORT gdcmDicomDirStudy : public gdcmObject { -public: - gdcmDicomDirStudy(gdcmSQItem *s, TagDocEntryHT *ptagHT); - gdcmDicomDirStudy(TagDocEntryHT *ptagHT); +typedef std::list ListDicomDirSerie; - ~gdcmDicomDirStudy(void); - virtual void Print(std::ostream &os = std::cout); +// For future use (Full DICOMDIR) +typedef std::list ListDicomDirVisit; +/* +typedef std::list ListDicomDirResult; +typedef std::list ListDicomDirStudyComponent; +*/ +//----------------------------------------------------------------------------- /** - * \ingroup gdcmDicomDirStudy - * \brief returns the SERIE chained List for this STUDY. + * \brief describes a STUDY within a within a PATIENT + * (DicomDirPatient) of a given DICOMDIR (DicomDir) */ - inline ListDicomDirSerie &GetDicomDirSeries() - {return series;}; -/** - * \ingroup gdcmDicomDirStudy - * \brief adds the passed SERIE to the SERIE chained List for this STUDY. - */ - inline void AddDicomDirSerie(gdcmDicomDirSerie *obj) - {series.push_back(obj);}; +class GDCM_EXPORT DicomDirStudy : public DicomDirObject +{ + gdcmTypeMacro(DicomDirStudy); + +public: +/// \brief Constructs a DicomDirStudy with a RefCounter + static DicomDirStudy *New(bool empty=false) {return new DicomDirStudy(empty);} + + void Print(std::ostream &os = std::cout, std::string const &indent = "" ); + void WriteContent(std::ofstream *fp, FileType t, bool insideMetaElements,bool insideSequence ); + + // 'Serie' methods + DicomDirSerie *NewSerie(); + /// Adds a gdcm::DicomDirSerie to a gdcm::DicomDirStudy + void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); } + void ClearSerie(); + 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 + void AddVisit(DicomDirVisit *obj) { Visits.push_back(obj); } + void ClearVisit(); + 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(); + DicomDirResult *GetNextResult(); + DicomDirResult *GetLastResult(); + + DicomDirStudyComponent *GetFirstStudyComponent(); + DicomDirStudyComponent *GetNextStudyComponent(); + DicomDirStudyComponent *GetLastStudyComponent(); +*/ + + virtual void Copy(DocEntrySet *set); + +protected: + DicomDirStudy(bool empty=false); + ~DicomDirStudy(); -/** - * \ingroup gdcmDicomDirStudy - * \brief TODO - */ - gdcmDicomDirSerie* NewSerie(void); - private: -/** -* \brief chained list of DicomDirSeries (to be exploited recursively) -*/ - ListDicomDirSerie series; + /// chained list of DicomDirSeries (to be exploited hierarchicaly) + ListDicomDirSerie Series; + /// iterator on the DicomDirSeries of the current DicomDirStudy + ListDicomDirSerie::iterator ItSerie; + + /// chained list of DicomDirVisits(single level) + ListDicomDirVisit Visits; + /// iterator on the DicomDirVisits of the current DicomDirStudy + ListDicomDirVisit::iterator ItVisit; + + + // for future use (Full DICOMDIR) +/* + /// chained list of DicomDirResults(single level) + ListDicomDirResult Results; + /// iterator on the DicomDirResults of the current DicomDirStudy + ListDicomDirResult::iterator ItResult; + + /// chained list of DicomDirStudyComponents(single level) + ListDicomDirStudyComponent StudyComponents; + /// iterator on the DicomDirStudyComponents of the current DicomDirStudy + ListDicomDirStudyComponent::iterator ItStudyComponents; +*/ }; +} // end namespace gdcm //----------------------------------------------------------------------------- #endif