Supplement 174: Restful Rendering Page 1
Total Page:16
File Type:pdf, Size:1020Kb
9 September 2015 Supplement 174: Restful Rendering Page 1 5 10 Digital Imaging and Communications in Medicine (DICOM) Supplement 174: RESTful Rendering 15 20 DICOM Standards Committee, Working Group 27: Web Technologies 1300 N. 17th Street Suite 900 Rosslyn, Virginia 22209 USA VERSION: Final Text Developed in accordance with work item 2014-04-A. 25 9 September 2015 Supplement 174: Restful Rendering Page 2 Table of Contents 1 Scope and Field of Application 3 2 Normative References 3 4 Terms and Definitions 3 30 6 Data Communication Requirements 4 6.1.1 Media Types 4 6.1.1.1 Multipart Media Types 5 6.1.1.2 DICOM Resource Categories 5 6.1.1.3 Rendered Media Types 6 35 6.1.1.4 Acceptable Media Types 7 6.1.1.5 Accept Query Parameter 7 6.1.1.6 Accept Header Field 8 6.1.1.7 Selected Media Type 8 6.1.2 Character Sets 9 40 6.1.2.1 Acceptable Character Sets 10 6.1.2.2 Character Set Query Parameter 10 6.1.2.3 Accept-Charset Header Field 10 6.1.2.4 Selected Character Set 10 6.2.2 List of Media Types Supported Acceptable in the Response 11 45 6.2.2.1 Query Parameters 11 6.2.2.1.1 Accept Query Parameter 11 6.2.2.1.2 Character Set Query Parameter 11 6.2.2.2 Header Fields 12 6.2.2.2.1 Accept 12 50 6.2.2.2.2 Accept-Charset 12 6.5 WADO-RS Request/Response 12 6.5.8 RS Retrieve Rendered Transaction 13 6.5.8.1 Request 13 6.5.8.1.1 Target Resources 13 55 6.5.8.1.2 Query Parameters 14 6.5.8.1.3 Header Fields 16 6.5.8.1.4 Payload 16 6.5.8.2 Behavior 16 6.5.8.2.1 Presentation State Instance 17 60 6.5.8.3 Response 17 6.5.8.3.1 Status Codes 18 6.5.8.3.2 Header Fields 18 6.5.8.3.3 Payload 18 6.5.8.4 Media Types 18 65 8.1.5 MIME Acceptable Media Types of the Response 18 8.1.6 Charset of the Response 19 Annex D IANA Character Set Mapping (Informative) 20 9 September 2015 Supplement 174: Restful Rendering Page 3 70 1 Scope and Field of Application This supplement defines rendering functionality for Restful Services (RS) that is largely equivalent to the functionality in the URI and WS services. It defines Retrieve Rendered and Retrieve Rendered Presentation State transactions for Restful Services. These transactions allow a user agent to retrieve rendered images and other instances in non-DICOM media types from an origin server. 75 In response to a user agent’s request, the origin server will render DICOM instances (images, video, reports, etc.) and encode them in consumer format media types. Almost all consumer formats require remapping the pixel depth to 8 bits. Security is beyond the scope of the RESTful services defined in this supplement. However generic Web security mechanisms are fully compatible. 80 2 Normative References Insert the following in Section 2 at the appropriate place: [IEC 61966-2.1] IEC. 1999. Multimedia systems and equipment - colour measurement and management - Part 2.1: colour management - Default RGB colour space – sRGB. ISBN: 2-8318-4989-6 - ICS codes: 33.160.60, 37.080 - TC 100 - 51 pp. as amended by Amendment A1:2003. 85 https://en.wikipedia.org/wiki/RGB_color_space ISO/IEC 2022:1994 Information technology -- Character code structure and extension http://www.ecma- international.org/publications/standards/Ecma-035.htm IETF RFC2046 Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types https://tools.ietf.org/html/rfc2046 90 IETF RFC2387 The MIME Multipart/Related Content-type https://tools.ietf.org/html/rfc2387 IETF RFC2978 IANA Charset Registration Procedures https://tools.ietf.org/html/rfc2978 IETF RFC6838 Media Type Specifications and Registration https://tools.ietf.org/html/rfc6838 IETF RFC6365 Terminology Used in Internationalization in the IETF https://tools.ietf.org/html/rfc6365 IETF RFC7405 Case Sensitive Strings in ABNF https://tools.ietf.org/html/rfc7405 95 4 Terms and Definitions Insert the following in Section 4 at the appropriate place: Accept Query Parameter A query parameter that specifies one or more media types acceptable for the representation(s) 100 contained in the response. See Section 6.1.1.5. Acceptable Character Sets One or more character sets acceptable to the user agent in the response. See Section 6.1.2.1. Acceptable Media Types One or more media type acceptable to the user agent in the response. See Section 6.1.1.4. 9 September 2015 Supplement 174: Restful Rendering Page 4 105 Charset Query Parameter A query parameter that specifies one or more character sets for the representation(s) contained in the response. See Section 6.1.2.2. DICOM Resource Categories A set of categories for the content of DICOM SOP Instances. Examples include images, video, and 110 text. See Section 6.1.1.2. Rendered Media Type A non-DICOM media type into which DICOM instances may be transformed in order to display them using commonly available non-DICOM software, for example browsers. See Section 6.1.1.3. Selected Character Set 115 The character sets selected by the origin server for the response payload. See Section 6.1.2.4. Selected Media Type The media type selected by the origin server for the response payload. See Section 6.1.1.7. sRGB A standard RGB color space <https://en.wikipedia.org/wiki/RGB_color_space> defined in [IEC 61966-2.1]. 120 UTF-8 Unicode UTF-8 character set 6 Data Communication Requirements Add a new Section 6.1.1: 125 6.1.1 Media Types Media types are identifiers used to define the data format of a representation. HTTP uses media types in the Content-Type and Accept header fields in order to provide open and extensible data typing and type negotiation. The syntax of media types is: media-type = type "/" subtype *(OWS ";" OWS parameter) 130 Where type = token subtype = token parameter = token "=" (token / quoted-string)) The <type>/<subtype> may be followed by parameters in the form of name=value pairs. 135 The type, subtype, and parameter name tokens are case-insensitive, but the case sensitivity of parameter values depends on the semantics of the parameter name. The presence or absence of a parameter might be significant to the processing of a media-type, depending on its definition within the media type registry. A parameter value can be transmitted either as a token or quoted-string. The quoted and unquoted 140 values are equivalent. Media types are defined in [RFC7231, Section 3.1.1.1 <https://tools.ietf.org/html/rfc7231#section- 3.1.1.1>]. 9 September 2015 Supplement 174: Restful Rendering Page 5 IANA maintains a registry of media types at <http://www.iana.org/assignments/media-types/media- types.xhtml>. 145 6.1.1.1 Multipart Media Types Some of the services defined in this Standard support the multipart media types [RFC2387 <https://tools.ietf.org/html/rfc2387>]. The syntax is: multipart-media-type = "multipart" "/" subtype *( OWS ";" OWS parameter ) The "application/multipart-related" media type is used by the RS services. Its syntax is: 150 multipart-related = "multipart/related" OWS ";" OWS "type" "=" DQUOTE media-type DQUOTE OWS ";" OWS "boundary" "=" boundary [related-parameters] Where 155 boundary = 0*69bchar bchar-nospace bchar = bchar-nospace / SP bchar-nospace = DIGIT / ALPHA / "'" / "(" / ")" / "+" / "_" / "," / "-" / "." / "/" / ":" / "=" / "?" "/" / ":" / "=" / "?" related-parameters = [";" "start" "=" cid] 160 [";" "start-info" "=" cid-list] cid-list = cid cid-list cid = token / quoted-string The "type" parameter is required. It contains the media type of the "root" body part. It always contains the special character "/" and thus requires quote marks. 165 The <cid> is a content identifier. It should be unique for each part of the multipart message. Typically, the "start" and "start-info" parameters are not specified, and the "root" is the first body part. 6.1.1.2 DICOM Resource Categories Table 6.1.1-1 defines Resource Categories that correspond to different SOP Classes. The following sections map each Resource Category to appropriate DICOM and Rendered media types. 170 Table 6.1.1-1: Resource Categories Resource Category Definition Single Frame Image This category includes all resources that: 1) are instances of a single frame SOP Class, or 2) are instances of a multi-frame SOP Class that contain only one frame, or 3) are a single frame selected from an instance of a multi-frame SOP Class. Multi-Frame Image This category includes all resources that are instances of a multi-frame SOP Class, that are not video and that contain more than one frame. Video This category includes all resources that contain more than one frame and: 1) are instances encoded in the MPEG family of transfer syntaxes (which includes MP4 and H265), or 2) are time based (motion) multi-frame images that the origin server is capable of encoding in the MPEG family. Text This category includes all resources that: 1) contain the SR Document Content Module (see PS3.4, Section C.17.3), such as narrative text, structured reports, CAD, measurement reports, and key object selection documents, or 9 September 2015 Supplement 174: Restful Rendering Page 6 2) contain the Encapsulated Document Module (see PS3.4, Section C.24.2). Other This category includes all resources that are not included above. 6.1.1.3 Rendered Media Types DICOM resources may be converted into non-DICOM media types in order to render them using commonly available non-DICOM software, such as browsers.