comparison OrthancServer/DicomProtocol/DicomUserConnection.cpp @ 519:1b2cdc855bd3

Parameter for PACS manufacturer, support for ClearCanvas
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Aug 2013 13:39:42 +0200
parents 4d5f0857ec9c
children 08eca5d86aad
comparison
equal deleted inserted replaced
517:b2b56b4e33b0 519:1b2cdc855bd3
292 DU_putStringDOElement(dataset.get(), DcmTagKey(0x0020, 0x000e), ""); 292 DU_putStringDOElement(dataset.get(), DcmTagKey(0x0020, 0x000e), "");
293 293
294 break; 294 break;
295 295
296 case FindRootModel_Instance: 296 case FindRootModel_Instance:
297 DU_putStringDOElement(dataset.get(), DcmTagKey(0x0008, 0x0052), "INSTANCE"); 297 if (manufacturer_ == ModalityManufacturer_ClearCanvas)
298 {
299 // This is a particular case for ClearCanvas, thanks to Peter Somlo <peter.somlo@gmail.com>.
300 // https://groups.google.com/d/msg/orthanc-users/j-6C3MAVwiw/iolB9hclom8J
301 // http://www.clearcanvas.ca/Home/Community/OldForums/tabid/526/aff/11/aft/14670/afv/topic/Default.aspx
302 printf("CLEAR CANVAS\n");
303 DU_putStringDOElement(dataset.get(), DcmTagKey(0x0008, 0x0052), "IMAGE");
304 }
305 else
306 {
307 printf("GENERIC\n");
308 DU_putStringDOElement(dataset.get(), DcmTagKey(0x0008, 0x0052), "INSTANCE");
309 }
310
298 sopClass = UID_FINDStudyRootQueryRetrieveInformationModel; 311 sopClass = UID_FINDStudyRootQueryRetrieveInformationModel;
299 312
300 // Accession number 313 // Accession number
301 if (!fields.HasTag(0x0008, 0x0050)) 314 if (!fields.HasTag(0x0008, 0x0050))
302 DU_putStringDOElement(dataset.get(), DcmTagKey(0x0008, 0x0050), ""); 315 DU_putStringDOElement(dataset.get(), DcmTagKey(0x0008, 0x0050), "");
451 { 464 {
452 localAet_ = "STORESCU"; 465 localAet_ = "STORESCU";
453 distantAet_ = "ANY-SCP"; 466 distantAet_ = "ANY-SCP";
454 distantPort_ = 104; 467 distantPort_ = 104;
455 distantHost_ = "127.0.0.1"; 468 distantHost_ = "127.0.0.1";
469 manufacturer_ = ModalityManufacturer_Generic;
456 470
457 pimpl_->net_ = NULL; 471 pimpl_->net_ = NULL;
458 pimpl_->params_ = NULL; 472 pimpl_->params_ = NULL;
459 pimpl_->assoc_ = NULL; 473 pimpl_->assoc_ = NULL;
460 } 474 }
472 486
473 void DicomUserConnection::SetDistantApplicationEntityTitle(const std::string& aet) 487 void DicomUserConnection::SetDistantApplicationEntityTitle(const std::string& aet)
474 { 488 {
475 Close(); 489 Close();
476 distantAet_ = aet; 490 distantAet_ = aet;
491 }
492
493 void DicomUserConnection::SetDistantManufacturer(ModalityManufacturer manufacturer)
494 {
495 Close();
496 manufacturer_ = manufacturer;
477 } 497 }
478 498
479 499
480 void DicomUserConnection::SetDistantHost(const std::string& host) 500 void DicomUserConnection::SetDistantHost(const std::string& host)
481 { 501 {