]> Creatis software - gdcm.git/commitdiff
User new feature to skip Sequences and/or shadow groups
authorjpr <jpr>
Thu, 14 Apr 2005 14:27:57 +0000 (14:27 +0000)
committerjpr <jpr>
Thu, 14 Apr 2005 14:27:57 +0000 (14:27 +0000)
Testing/TestMakeDicomDir.cxx

index f73b0e49ad2c795537d38235de4ead2aee633c9e..f3acdbd2fe62f9422a950b2b416b0abe1a5ce527 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestMakeDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 10:41:10 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2005/04/14 14:27:57 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -47,7 +47,7 @@ void EndMethod(void *endMethod)
 
 int TestMakeDicomDir(int argc, char *argv[])
 {
-//   gdcm::Debug::DebugOn();
+   //gdcm::Debug::DebugOn();
    std::string dirName;   
 
    if (argc > 1)
@@ -59,8 +59,17 @@ int TestMakeDicomDir(int argc, char *argv[])
       dirName = GDCM_DATA_ROOT;
    }
 
+   gdcm::DicomDir *dcmdir;
     // we ask for Directory parsing
-    gdcm::DicomDir *dcmdir = new gdcm::DicomDir(dirName, true);
+    // Old style (still available) :
+    // dcmdir = new gdcm::DicomDir(dirName, true);
+
+   // new style (user is allowed no to load Sequences an/or Shadow Groups)
+   dcmdir = new gdcm::DicomDir( );
+   dcmdir->SetParseDir(true);
+   dcmdir->SetLoadMode(NO_SEQ | NO_SHADOW);
+   dcmdir->Load(dirName);
 
    dcmdir->SetStartMethod(StartMethod, (void *) NULL);
    dcmdir->SetEndMethod(EndMethod);