comparison OrthancServer/main.cpp @ 1368:b22ba8c5edbe query-retrieve

query retrieve
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 26 May 2015 17:54:34 +0200
parents a3559b66fba7
children 461e7554bff7
comparison
equal deleted inserted replaced
1367:fe6e5a9f1ea2 1368:b22ba8c5edbe
382 } 382 }
383 } 383 }
384 384
385 385
386 386
387
388
387 static bool StartOrthanc(int argc, char *argv[]) 389 static bool StartOrthanc(int argc, char *argv[])
388 { 390 {
389 #if ENABLE_PLUGINS == 1 391 #if ENABLE_PLUGINS == 1
390 OrthancPlugins orthancPlugins; 392 OrthancPlugins orthancPlugins;
391 orthancPlugins.SetCommandLineArguments(argc, argv); 393 orthancPlugins.SetCommandLineArguments(argc, argv);
531 LOG(WARNING) << "The DICOM server is disabled"; 533 LOG(WARNING) << "The DICOM server is disabled";
532 } 534 }
533 535
534 LOG(WARNING) << "Orthanc has started"; 536 LOG(WARNING) << "Orthanc has started";
535 537
536
537 if (1)
538 {
539 DicomUserConnection c;
540 c.SetLocalApplicationEntityTitle("ORTHANC");
541 c.SetRemoteApplicationEntityTitle("ORTHANC");
542 c.SetRemoteHost("localhost");
543 c.SetRemotePort(4343);
544 c.Open();
545
546 DicomMap m; // Cardiac
547 m.SetValue(DICOM_TAG_PATIENT_ID, "3390592L");
548 //m.SetValue(DICOM_TAG_STUDY_INSTANCE_UID, "1.3.51.0.1.1.192.168.29.133.1681753.1681732");
549 //m.SetValue(DICOM_TAG_SERIES_INSTANCE_UID, "1.3.12.2.1107.5.2.33.37097.2012041612474981424569674.0.0.0");
550 //m.SetValue(DICOM_TAG_SOP_INSTANCE_UID, "1.3.12.2.1107.5.2.33.37097.2012041612485535037669708");
551
552 DicomFindAnswers fnd;
553 c.FindPatient(fnd, m);
554 //c.FindInstance(fnd, m);
555 //c.FindSeries(fnd, m);
556 //c.FindStudy(fnd, m);
557
558 for (size_t i = 0; i < fnd.GetSize(); i++)
559 {
560 FromDcmtkBridge::Print(stdout, fnd.GetAnswer(i));
561 c.Move("ORTHANC", fnd.GetAnswer(i));
562 }
563
564 printf("ok %d\n", fnd.GetSize());
565 }
566
567
568 Toolbox::ServerBarrier(restApi.ResetRequestReceivedFlag()); 538 Toolbox::ServerBarrier(restApi.ResetRequestReceivedFlag());
569 isReset = restApi.ResetRequestReceivedFlag(); 539 isReset = restApi.ResetRequestReceivedFlag();
570 540
571 if (isReset) 541 if (isReset)
572 { 542 {