comparison OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.cpp @ 1831:a03260db8835

Added SetCallerName to IOracleCommand to ease debugging and logging
author Benjamin Golinvaux <bgo@osimis.io>
date Thu, 03 Jun 2021 09:14:07 +0200
parents 4ee11b8773e2
children 3889ae96d2e9
comparison
equal deleted inserted replaced
1830:fa38043b14b0 1831:a03260db8835
102 { 102 {
103 // Download the "Grid Frame Offset Vector" DICOM tag, that is 103 // Download the "Grid Frame Offset Vector" DICOM tag, that is
104 // mandatory for RT-DOSE, but is too long to be returned by default 104 // mandatory for RT-DOSE, but is too long to be returned by default
105 105
106 std::unique_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand); 106 std::unique_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand);
107 command->SetCallerName("OrthancMultiframeVolumeLoader::LoadGeometry");
107 command->SetUri("/instances/" + loader.GetInstanceId() + "/content/" + 108 command->SetUri("/instances/" + loader.GetInstanceId() + "/content/" +
108 Orthanc::DICOM_TAG_GRID_FRAME_OFFSET_VECTOR.Format()); 109 Orthanc::DICOM_TAG_GRID_FRAME_OFFSET_VECTOR.Format());
109 command->AcquirePayload(new LoadRTDoseGeometry(loader, dicom.release())); 110 command->AcquirePayload(new LoadRTDoseGeometry(loader, dicom.release()));
110 111
111 Schedule(command.release()); 112 Schedule(command.release());
175 if (transferSyntaxUid_ == "1.2.840.10008.1.2" || 176 if (transferSyntaxUid_ == "1.2.840.10008.1.2" ||
176 transferSyntaxUid_ == "1.2.840.10008.1.2.1" || 177 transferSyntaxUid_ == "1.2.840.10008.1.2.1" ||
177 transferSyntaxUid_ == "1.2.840.10008.1.2.2") 178 transferSyntaxUid_ == "1.2.840.10008.1.2.2")
178 { 179 {
179 std::unique_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand); 180 std::unique_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand);
181 command->SetCallerName("OrthancMultiframeVolumeLoader::ScheduleFrameDownloads");
180 command->SetHttpHeader("Accept-Encoding", "gzip"); 182 command->SetHttpHeader("Accept-Encoding", "gzip");
181 command->SetUri("/instances/" + instanceId_ + "/content/" + 183 command->SetUri("/instances/" + instanceId_ + "/content/" +
182 Orthanc::DICOM_TAG_PIXEL_DATA.Format() + "/0"); 184 Orthanc::DICOM_TAG_PIXEL_DATA.Format() + "/0");
183 command->AcquirePayload(new LoadUncompressedPixelData(*this)); 185 command->AcquirePayload(new LoadUncompressedPixelData(*this));
184 Schedule(command.release()); 186 Schedule(command.release());
613 615
614 instanceId_ = instanceId; 616 instanceId_ = instanceId;
615 617
616 { 618 {
617 std::unique_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand); 619 std::unique_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand);
620 command->SetCallerName("OrthancMultiframeVolumeLoader::LoadInstance");
618 command->SetHttpHeader("Accept-Encoding", "gzip"); 621 command->SetHttpHeader("Accept-Encoding", "gzip");
619 command->SetUri("/instances/" + instanceId + "/tags"); 622 command->SetUri("/instances/" + instanceId + "/tags");
620 command->AcquirePayload(new LoadGeometry(*this)); 623 command->AcquirePayload(new LoadGeometry(*this));
621 Schedule(command.release()); 624 Schedule(command.release());
622 } 625 }
623 626
624 { 627 {
625 std::unique_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand); 628 std::unique_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand);
629 command->SetCallerName("OrthancMultiframeVolumeLoader::LoadInstance");
626 command->SetUri("/instances/" + instanceId + "/metadata/TransferSyntax"); 630 command->SetUri("/instances/" + instanceId + "/metadata/TransferSyntax");
627 command->AcquirePayload(new LoadTransferSyntax(*this)); 631 command->AcquirePayload(new LoadTransferSyntax(*this));
628 Schedule(command.release()); 632 Schedule(command.release());
629 } 633 }
630 } 634 }