Program: gdcm
Module: $RCSfile: TestBuildUpDicomDir.cxx,v $
Language: C++
- Date: $Date: 2006/04/11 16:05:03 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2007/04/12 13:06:02 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::cerr << "Usage: " << argv[0] << " dummy " << std::endl;
}
- //gdcm::Debug::DebugOn();
+ // gdcm::Debug::DebugOn();
bool errorFound = false;
gdcm::DicomDir *dcmdir;
dcmdir = gdcm::DicomDir::New();
gdcm::DicomDirPatient *p1;
+
// --- Forget these 4 lines :
// just to improve test coverage.
p1=dcmdir->GetFirstPatient();
// Let's create and add a Image for this Serie
s1111 = s111->NewImage();
s1111->SetEntryString("imageFileName1111",0x0004,0x1500);
-
gdcm::DicomDirImage *s1112 = s111->NewImage();
s1112->SetEntryString("imageFileName1112",0x0004,0x1500);
// Print
std::cout << "Test/BuildUpDicomDir: Test Print of patients\n";
p1->Print();
- std::cout << "Test/BuildUpDicomDir: -------------------\n";
+ std::cout << "Test/BuildUpDicomDir: end of P1-------------------\n";
p2->Print();
- std::cout << "Test/BuildUpDicomDir: -------------------\n";
+ std::cout << "Test/BuildUpDicomDir: end of P2-------------------\n";
p3->Print();
+ std::cout << "Test/BuildUpDicomDir: end of P3-------------------\n";
std::cout << "Test/BuildUpDicomDir: Test Print of patients ended\n";
+
+
+ // Let's loop on Patients.
+ gdcm::DicomDirPatient *p;
+ p=dcmdir->GetFirstPatient();
+ while (p) {
+ std::cout << "one more patient\n";
+ p->Print();
+ p=dcmdir->GetNextPatient();
+ }
+
if( !dcmdir->IsReadable() )
{
Program: gdcm
Module: $RCSfile: TestDicomDir.cxx,v $
Language: C++
- Date: $Date: 2007/03/23 15:03:01 $
- Version: $Revision: 1.44 $
+ Date: $Date: 2007/04/12 13:06:02 $
+ Version: $Revision: 1.45 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
file += "/DICOMDIR";
}
+ std::cout << "DicomDir we're going to deal with : ["<< file << "]"
+ << std::endl;
+
dicomdir = gdcm::DicomDir::New();
dicomdir->SetFileName(file);
dicomdir->Load();
pa1 = dicomdir->GetNextPatient();
}
+/*
+// this one is *really* too much verbose!
+
std::cout << std::endl << std::endl
<< " = DICOMDIR full content ===================================="
<< std::endl<< std::endl;
- // dicomdir->Print();
-
+ dicomdir->Print();
+ std::cout << std::endl << std::endl
+ << " = end of DICOMDIR full content ===================================="
+ << std::endl<< std::endl;
+*/
// ------------------------- second stage ---------------------------
+
+
+ gdcm::Debug::DebugOn();
+
// Write on disc what we read
dicomdir->Write("NewDICOMDIR");
Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2007/04/12 10:43:42 $
- Version: $Revision: 1.191 $
+ Date: $Date: 2007/04/12 13:06:03 $
+ Version: $Revision: 1.192 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
Initialize(); // sets all private fields to NULL
ParseDir = false;
- // NewMeta();
+ NewMeta();
}
//#ifndef GDCM_LEGACY_REMOVE
}
else
{
- NewMeta();
CreateDicomDir();
}
}