]> Creatis software - gdcm.git/commitdiff
Update comments for DicomDir stuff
authorjpr <jpr>
Sun, 6 Feb 2005 14:31:09 +0000 (14:31 +0000)
committerjpr <jpr>
Sun, 6 Feb 2005 14:31:09 +0000 (14:31 +0000)
src/gdcmCommon.h
src/gdcmDicomDir.cxx
src/gdcmDicomDir.h
src/gdcmDicomDirElement.h
src/gdcmDicomDirStudy.h

index a51dd6603d2920aaa065f09e2b47f81bc0a2c88d..b4eb0d9614f7edc5ed2c84b68c66511e75be2aab 100644 (file)
@@ -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
index fd83573bd5178f14855e3f401b1dc2ea93177a3b..f25fefd786f195de9111b89d1e89b500ff3f659b 100644 (file)
@@ -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
 #else
 #   include <unistd.h>
 #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;
index e7c6808feb714d6d9df6c731ca28682b2f652a44..a7d6893daea6d031b6ad40d123d9c2756319c27a 100644 (file)
@@ -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   
-   MethodStartMethod;
+   Method *StartMethod;
    /// pointer to the incrementation method for any progress bar
-   MethodProgressMethod;
+   Method *ProgressMethod;
    /// pointer to the termination method for any progress bar
-   MethodEndMethod;
+   Method *EndMethod;
    /// pointer to the ??? method for any progress bar   
-   MethodStartMethodArgDelete;
+   Method *StartMethodArgDelete;
    /// pointer to the ??? method for any progress bar
    Method* ProgressMethodArgDelete;
    /// pointer to the ??? method for any progress bar
-   MethodEndMethodArgDelete;
+   Method *EndMethodArgDelete;
    /// pointer to the ??? for any progress bar   
-   voidStartArg;
+   void *StartArg;
    /// pointer to the ??? for any progress bar
-   voidProgressArg;
+   void *ProgressArg;
    /// pointer to the ??? for any progress bar   
-   voidEndArg;
+   void *EndArg;
    /// value of the ??? for any progress bar
    float Progress;
    /// value of the ??? for any progress bar   
index c23be83a9e6b22a8c995205b99a9cfadd164d117..bffec0cc21b1bf8c52db56dd8814940a43a568ef 100644 (file)
@@ -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<Element> ListDicomDirElem;
 typedef std::list<Element> ListDicomDirMetaElem;
@@ -50,8 +37,8 @@ typedef std::list<Element> 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
 {
index 168efcbba00ba6c530bd7e8e6dbefb8b62408491..b9972f5eff2bc2b8af4d31b05fd7d36383df2098 100644 (file)
@@ -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
-   DicomDirSerieNewSerie();
+   DicomDirSerie *NewSerie();
    /// Adds a gdcm::DicomDirSerie to a Study
    void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); };
    void ClearSerie();