public HttpResponseMessage GetStudiesMetadata ( [ModelBinder(typeof(RsStudiesRequestModelBinder))] IWadoRsStudiesRequest request ) { return(WadoService.RetrieveStudyMetadata(request)); }
public HttpResponseMessage RetrieveBulkData(IWadoRsStudiesRequest request) { string mimeType = null; var wadoResponses = CreateRetrieveInstanceResponse(request, new WadoRSInstanceRequest(request), out mimeType); return(ResponseService.CreateWadoRsResponse(request, wadoResponses, mimeType)); }
private void FillStudyParams(IValueProvider valueProvider, IWadoRsStudiesRequest result) { result.StudyInstanceUID = valueProvider.GetValue("StudyInstanceUID").RawValue as string; }
public WadoRSInstanceRequest(IWadoRsStudiesRequest request) { AcceptCharsetHeader = request.AcceptCharsetHeader; AcceptHeader = request.AcceptHeader; StudyInstanceUID = request.StudyInstanceUID; }
//Metadata can be XML (Required) or Json (optional) only. DICOM Instances are returned with no bulk data //Bulk data URL can be returned (which we should) public virtual HttpResponseMessage RetrieveStudyMetadata(IWadoRsStudiesRequest request) { return(RetrieveInstanceMetadata(new WadoRsInstanceRequest(request))); }
//DICOM Instances are returned in either DICOM or Bulk data format //DICOM format is part10 native, Bulk data is based on the accept: //octet-stream, jpeg, jp2.... public virtual HttpResponseMessage RetrieveStudy(IWadoRsStudiesRequest request) { return(RetrieveMultipartInstance(request, new WadoRsInstanceRequest(request))); }
public virtual bool TryParse(HttpRequestMessage request, ModelBindingContext bindingContext, out T result) { var query = request.RequestUri.ParseQueryString( ); result = null; if (typeof(T) == typeof(IWadoRsStudiesRequest)) { IWadoRsStudiesRequest wadoReq = CreateWadoRsStudiesRequestModel( ); FillStudyParams(bindingContext.ValueProvider, wadoReq); wadoReq.QueryLevel = ObjectQueryLevel.Study; result = wadoReq as T; } if (typeof(T) == typeof(IWadoRsSeriesRequest)) { IWadoRsSeriesRequest wadoReq = CreateWadoRsSeriesRequestModel( ); FillSeriesParams(bindingContext.ValueProvider, wadoReq); wadoReq.QueryLevel = ObjectQueryLevel.Series; result = wadoReq as T; } if (typeof(T) == typeof(IWadoRsInstanceRequest)) { IWadoRsInstanceRequest wadoReq = CreateWadoRsInstanceRequestModel( ); FillInstanceParams(bindingContext.ValueProvider, wadoReq); wadoReq.QueryLevel = ObjectQueryLevel.Instance; result = wadoReq as T; } if (typeof(T) == typeof(IWadoRsFramesRequest)) { IWadoRsFramesRequest wadoReq = CreateWadoRsFramesRequestModel( ); FillIFramesParams(bindingContext.ValueProvider, wadoReq); wadoReq.QueryLevel = ObjectQueryLevel.Instance; result = wadoReq as T; } if (null != result) { WadoRsRequestBase reqBase = result as WadoRsRequestBase; reqBase.Headers = request.Headers; reqBase.AcceptHeader = request.Headers.Accept; reqBase.AcceptCharsetHeader = request.Headers.AcceptCharset; reqBase.QueryLevel = ObjectQueryLevel.Instance; return(true); } else { return(false); } }