Thursday, September 11, 2014

WADO-RS Overview

WADO-RS was recently added to the DICOM standard in 2011 with Supplement 161.  The RS stands for REST or RESTful and is generally easier to understand and work with than WS* Web Services.  WADO-RS was mainly driven by the need to provide a way for clients to access multiple SOP Instances in one HTTP request which had been shown by the MINT project to offer significant performance gains.

One of the key concepts that WG27 took from the MINT project was the concept of bulk data.  A bulk data item is a field in a DICOM SOP Instance that is typically very large - such as the Pixel Data field 7FE0,0010.  To maximize performance, all fields for a study can be retrieved at once but bulk data fields are replaced with a URL that can be used to obtain the bulk data item via a separate request.  This strategy enables clients to stream the pieces of the study they want, when they need them.  This strategy is often used by image viewers to deliver images "on demand".  

WADO-RS provides multiple ways to access SOP Instances to support a variety of use cases and scenarios:

  1. RS – RetrieveMetadata.  This allows a client to retrieve all fields (except bulk data) for all SOP Instances in a study.  It supports both XML and JSON responses.  The JSON response is an array of objects, each of which contains all of the fields for each SOP instance in the study.  The data in bulk data fields is replaced with a URL which can be used to get the actual bulk data separately.  The XML response is a multi-part MIME message with each SOP Instance returned as a separate XML document and encoded as a single part.
  2. RS – RetrieveBulkdata.  This is the mechanism to retrieve a single bulk data item as returned in the RS-RetrieveMetadata response.  By default the bulk data is returned in little endian transfer syntax, but other transfer syntaxes can be requested (e.g. JPEG2000)
  3. RS - RetrieveFrames.  This mechanism allows a client to get all image frames for a study, series or SOP Instance in one request.  The frames are returned in a multi-part mime message with each frame encoded as single part.  By default frames are returned in little endian transfer syntaxes but other transfer syntaxes can be requested (e.g. JPEG 2000).  
  4. RS – RetrieveStudy.  This allows a client to obtain all SOP Instances for a study in one request.  Each SOP Instances is sent as a separate part in a multi-part MIME message with each SOP Instances as a DICOM P10 byte stream (application/dicom) encoded in a single part.  You can also request just the bulk data items for a study and they are returned in a multi-part MIME message with each bulk data item as an individual part.
  5. RS – RetrieveSeries.  Same as RS-RetrieveStudy but scoped to a series.
  6. RS – RetrieveInstance.  Same as RS-RetrieveStudy but scoped to an individual SOP Instance


7 comments:

  1. Hello,
    I would like to know if there is a reference implementation which provide the application/dicom and application/octet-stream. If you can help with commenting on the difference between these, that would of great help.
    Thanks.

    ReplyDelete
  2. The open source Orthanc Server has most (if not all) of WADO-RS implemented: http://www.orthanc-server.com/ The OHIF Viewer https://github.com/OHIF/Viewers is an open source viewer based on WADO-RS that uses Orthanc. application/dicom is the mime type for DICOM P10 byte streams. application/octet-sequence is the mime type used for binary data where the mime type is not known (or is not defined). I believe application/octet-sequence is the content type returned via WADO-RS RetrieveFrames for individual pixel frames

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Hi Chris, Thanks for the input. I had used ORTHANC and seems very handy and light weight. OHIF, i am to check today. I had tried the dicomserver.co.uk also, but had to drop as it was not returning the content-length in WADO multi-part response. Also, it don't support the DICOM part 10 in STOW. There should be some more additions to DICOM standards to make sure that such programmer perspectives are added to the http parameters. Is there really some PACS or VNA in the commercial market and does this RS features are using in hospitals ?

    ReplyDelete
  6. How to request for a jpeg2000 transfer syntax in order to retrieveframes in http request

    ReplyDelete
  7. I want to develop WADO-RS service as need assistance, as i am medical education, can share article and need help as i am working in dcm4che but still not cope the workflow

    ReplyDelete