From 6003c9cbddd74caa0f6a7de58d5f1e3f8a4c38c4 Mon Sep 17 00:00:00 2001 From: jpr Date: Sun, 6 Feb 2005 14:31:09 +0000 Subject: [PATCH] Update comments for DicomDir stuff --- src/gdcmCommon.h | 18 +++++++++-- src/gdcmDicomDir.cxx | 66 ++++++++++++++++++++++++++++++++++----- src/gdcmDicomDir.h | 22 ++++++------- src/gdcmDicomDirElement.h | 21 +++---------- src/gdcmDicomDirStudy.h | 6 ++-- 5 files changed, 92 insertions(+), 41 deletions(-) diff --git a/src/gdcmCommon.h b/src/gdcmCommon.h index a51dd660..b4eb0d96 100644 --- a/src/gdcmCommon.h +++ b/src/gdcmCommon.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommon.h,v $ Language: C++ - Date: $Date: 2005/01/30 17:30:57 $ - Version: $Revision: 1.59 $ + Date: $Date: 2005/02/06 14:31:09 $ + Version: $Revision: 1.60 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -123,7 +123,6 @@ GDCM_EXPORT extern const std::string GDCM_UNREAD; /// a sequence, itself nested in the third item of a sequence is the /// string e.g. /// 0004|1220/2#0008|0082/0#0008|0090 -/// Probabely useless stuff. typedef std::string TagKey; typedef std::string TagName; @@ -144,6 +143,19 @@ enum DicomDirType { DD_IMAGE }; +/** + * \brief structure, for internal use only + */ +GDCM_EXPORT typedef struct +{ + /// DicomGroup number + unsigned short int Group; + /// DicomElement number + unsigned short int Elem; + /// value (coded as a std::string) of the Element + std::string Value; +} Element; + } //namespace gdcm //----------------------------------------------------------------------------- #endif diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index fd83573b..f25fefd7 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/02/05 01:37:08 $ - Version: $Revision: 1.128 $ + Date: $Date: 2005/02/06 14:31:09 $ + Version: $Revision: 1.129 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -50,7 +50,58 @@ #else # include #endif - +// ---------------------------------------------------------------------------- +// Note for future developpers +// ---------------------------------------------------------------------------- +// +// Dicom PS 3.3 describes the relationship between Directory Records, as follow +// +// Directory Record Type Directory Record Types which may be included +// in the next lower-èlevel directory Entity +// +// (Root directory Entity) PATIENT +// +// PATIENT STUDY +// +// STUDY SERIES, VISIT, RESULTS, STUDY COMPONENT +// +// SERIES IMAGE, OVERLAYS, MODALITY LUT, VOI LUT, +// CURVE, STORED PRINT, RT DOSE, RT STRUCTURE SET +// RT PLAN, RT TREAT RECORD, PRESENTATION, WAVEFORM, +// SR DOCUMENT, KEY OBJECT DOC, SPECTROSCOPY, +// RAW DATA, REGISTRATION, FIDUCIAL +// IMAGE +// OVERLAY +// MODALITY LUT +// VOI LUT +// CURVE +// STORED PRINT +// RT DOSE +// RT STRUCTURE SET +// RT PLAN +// RT TREAT RECORD +// PRESENTATION +// WAVEFORM +// SR DOCUMENT +// KEY OBJECT DOC +// SPECTROSCOPY +// RAW DATA +// REGISTRATION +// FIDUCIAL +// +// ---------------------- +// The current gdcm version only deals with : +// +// (Root directory Entity) PATIENT +// PATIENT STUDY +// STUDY SERIES +// SERIES IMAGE +// IMAGE +// +// DicomDir::CreateDicomDir will have to be completed +// Treelike structure management will have to be upgraded +// ---------------------------------------------------------------------------- + namespace gdcm { //----------------------------------------------------------------------------- @@ -732,7 +783,7 @@ bool DicomDir::AddImageToEnd(DicomDirImage *dd) * @param path path of the root directory * @param list chained list of Headers */ -void DicomDir::SetElements(std::string const & path, VectDocument const &list) +void DicomDir::SetElements(std::string const &path, VectDocument const &list) { ClearEntry(); ClearPatient(); @@ -747,7 +798,8 @@ void DicomDir::SetElements(std::string const & path, VectDocument const &list) bool first = true; for( VectDocument::const_iterator it = list.begin(); - it != list.end(); ++it ) + it != list.end(); + ++it ) { // get the current file characteristics patCurName = (*it)->GetEntryValue(0x0010,0x0010); @@ -869,10 +921,10 @@ void DicomDir::SetElement(std::string const &path, DicomDirType type, // imageElem 0008 1150 "" // Referenced SOP Class UID : to be set/forged later // imageElem 0008 1155 "" // Referenced SOP Instance UID : to be set/forged later // imageElem fffe e00d "" // Item delimitation : length to be set to ZERO later - // for all the relevant elements found in their own spot of the DicomDir.dic - + // FIXME : troubles found when it's a SeqEntry + // for all the relevant elements found in their own spot of the DicomDir.dic for( it = elemList.begin(); it != elemList.end(); ++it) { tmpGr = it->Group; diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index e7c6808f..a7d6893d 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.h,v $ Language: C++ - Date: $Date: 2005/02/02 14:52:25 $ - Version: $Revision: 1.53 $ + Date: $Date: 2005/02/06 14:31:09 $ + Version: $Revision: 1.54 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -56,7 +56,7 @@ public: ~DicomDir(); - void Print(std::ostream &os = std::cout, std::string const & indent = "" ); + void Print(std::ostream &os = std::cout, std::string const &indent = "" ); // Informations contained in the parser virtual bool IsReadable(); @@ -145,23 +145,23 @@ private: ListDicomDirPatient::iterator ItPatient; /// pointer to the initialisation method for any progress bar - Method* StartMethod; + Method *StartMethod; /// pointer to the incrementation method for any progress bar - Method* ProgressMethod; + Method *ProgressMethod; /// pointer to the termination method for any progress bar - Method* EndMethod; + Method *EndMethod; /// pointer to the ??? method for any progress bar - Method* StartMethodArgDelete; + Method *StartMethodArgDelete; /// pointer to the ??? method for any progress bar Method* ProgressMethodArgDelete; /// pointer to the ??? method for any progress bar - Method* EndMethodArgDelete; + Method *EndMethodArgDelete; /// pointer to the ??? for any progress bar - void* StartArg; + void *StartArg; /// pointer to the ??? for any progress bar - void* ProgressArg; + void *ProgressArg; /// pointer to the ??? for any progress bar - void* EndArg; + void *EndArg; /// value of the ??? for any progress bar float Progress; /// value of the ??? for any progress bar diff --git a/src/gdcmDicomDirElement.h b/src/gdcmDicomDirElement.h index c23be83a..bffec0cc 100644 --- a/src/gdcmDicomDirElement.h +++ b/src/gdcmDicomDirElement.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.h,v $ Language: C++ - Date: $Date: 2005/02/05 00:22:14 $ - Version: $Revision: 1.25 $ + Date: $Date: 2005/02/06 14:31:09 $ + Version: $Revision: 1.26 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,19 +27,6 @@ namespace gdcm { //----------------------------------------------------------------------------- -/** - * \brief internal structure, not end user intended - * shouln't appear here - */ -typedef struct -{ - /// DicomGroup number - unsigned short int Group; - /// DicomElement number - unsigned short int Elem; - /// value (coded as a std::string) of the Element - std::string Value; -} Element; typedef std::list ListDicomDirElem; typedef std::list ListDicomDirMetaElem; @@ -50,8 +37,8 @@ typedef std::list ListDicomDirImageElem; //----------------------------------------------------------------------------- /** - * \brief Represents elements contained in a DicomDir - * class for the chained lists from the file 'Dicts/DicomDir.dic' + * \brief Represents elements contained in a DicomDir class + * for the chained lists from the file 'Dicts/DicomDir.dic' */ class GDCM_EXPORT DicomDirElement { diff --git a/src/gdcmDicomDirStudy.h b/src/gdcmDicomDirStudy.h index 168efcbb..b9972f5e 100644 --- a/src/gdcmDicomDirStudy.h +++ b/src/gdcmDicomDirStudy.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirStudy.h,v $ Language: C++ - Date: $Date: 2005/02/04 16:51:36 $ - Version: $Revision: 1.24 $ + Date: $Date: 2005/02/06 14:31:09 $ + Version: $Revision: 1.25 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -42,7 +42,7 @@ public: void WriteContent(std::ofstream *fp, FileType t); // Serie methods - DicomDirSerie* NewSerie(); + DicomDirSerie *NewSerie(); /// Adds a gdcm::DicomDirSerie to a Study void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); }; void ClearSerie(); -- 2.45.1