comparison Resources/Samples/OrthancClient/Basic/main.cpp @ 591:a00f626290db

better api
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Oct 2013 17:36:14 +0200
parents 3237eea24487
children 08eca5d86aad
comparison
equal deleted inserted replaced
590:3237eea24487 591:a00f626290db
39 // Display the content of the local Orthanc instance 39 // Display the content of the local Orthanc instance
40 OrthancClient::OrthancConnection orthanc("http://localhost:8042"); 40 OrthancClient::OrthancConnection orthanc("http://localhost:8042");
41 41
42 for (unsigned int i = 0; i < orthanc.GetPatientCount(); i++) 42 for (unsigned int i = 0; i < orthanc.GetPatientCount(); i++)
43 { 43 {
44 OrthancClient::Patient patient = orthanc.GetPatient(i); 44 OrthancClient::Patient patient(orthanc.GetPatient(i));
45 std::cout << "Patient: " << patient.GetId() << std::endl; 45 std::cout << "Patient: " << patient.GetId() << std::endl;
46 46
47 for (unsigned int j = 0; j < patient.GetStudyCount(); j++) 47 for (unsigned int j = 0; j < patient.GetStudyCount(); j++)
48 { 48 {
49 OrthancClient::Study study = patient.GetStudy(j); 49 OrthancClient::Study study(patient.GetStudy(j));
50 std::cout << " Study: " << study.GetId() << std::endl; 50 std::cout << " Study: " << study.GetId() << std::endl;
51 51
52 for (unsigned int k = 0; k < study.GetSeriesCount(); k++) 52 for (unsigned int k = 0; k < study.GetSeriesCount(); k++)
53 { 53 {
54 OrthancClient::Series series = study.GetSeries(k); 54 OrthancClient::Series series(study.GetSeries(k));
55 std::cout << " Series: " << series.GetId() << std::endl; 55 std::cout << " Series: " << series.GetId() << std::endl;
56 56
57 for (unsigned int l = 0; l < series.GetInstanceCount(); l++) 57 for (unsigned int l = 0; l < series.GetInstanceCount(); l++)
58 { 58 {
59 std::cout << " Instance: " << series.GetInstance(l).GetId() << std::endl; 59 std::cout << " Instance: " << series.GetInstance(l).GetId() << std::endl;