/// <summary> /// queues the request to update the MPR /// </summary> void QueueRequest() { if (_ivdc == null) { return; } MprGenerationRequestV1 request = new MprGenerationRequestV1(); request.RequestTime = DateTime.Now; request.ImageVolumeId = _ivdc.Identity.Guid; request.SlicePosition = this.SlicePosition; request.Orientation = this.Orientation; request.WindowCenter = this.WindowCenter; request.WindowWidth = this.WindowWidth; if (_mges == null || _mges.State != CommunicationState.Opened) { _mges = new MprGenerationEngineServiceClient(); } OperationContextScope contextScope = new OperationContextScope(_mges.InnerChannel); { Guid methodId = Guid.NewGuid(); this._queueWaiting.TryAdd(methodId, request); ImageRenderManagerHelper.SetupResponseHeader(methodId); _mges.GenerateMpr(request); } // TODO: determine when to close // _mges.Close(); }
/// <summary> /// queues the request to update the MPR /// </summary> void QueueRequest() { if (_ivdc == null) return; MprGenerationEngineServiceClient mges = new MprGenerationEngineServiceClient(); MprGenerationRequestV1 request = new MprGenerationRequestV1(); request.RequestTime = DateTime.Now; request.ImageVolumeId = _ivdc.Identity.Guid; request.SlicePosition = this.SlicePosition; request.Orientation = this.Orientation; request.WindowCenter = this.WindowCenter; request.WindowWidth = this.WindowWidth; OperationContextScope contextScope = new OperationContextScope(mges.InnerChannel); { Guid methodId = Guid.NewGuid(); this._queueWaiting.TryAdd(methodId, request); ImageRenderManagerHelper.SetupResponseHeader(methodId); mges.GenerateMpr(request); } mges.Close(); }