Octet Stream Base64

  1. Octet-stream Base64
  2. Octet Stream Base64
  3. Application/octet-stream Base64 To Image
Octet Stream Base64

Octet-stream Base64

The DICOM Value Representation (VR) is included in each DICOM JSON Model attribute object and named 'vr'. For example:

Octet Stream Base64

The JSON encoding of an Attribute shall use the JSON Data Type corresponding to the DICOM Value Representations in Table F.2.3-1. The JSON encodings shall conform to the Definition, Character Repertoire (if applicable) and Length of Value specified for that DICOM Value Representation (see Section 6.2 “Value Representation (VR)” in PS3.5) with the following exceptions:

Application/octet-stream Base64 To Image

Yes, you can base64 encode an octet stream in Apigee Edge. If I were doing this, I would want to do it in Python callout, or a Java callout, or a JS callout. Here is a suitable Java callout that does this. The configuration would look like this. Base64 encoded octet-stream. Universal Resource Identifier or Universal Resource Locator (URI/URL) String. Unsigned 64-bit Very Long. Number or String.

The following is an excerpt from RFC 4648 illustrating the Alphabet for Base64. The Encoding Process. The process to encode the input stream is fairly straightforward. A) The octet stream is read from left to right. B) Three 8-bit groups within the input stream is concatenated to form a 24-bit group. Yes, ok, you have a PDF document being returned in binary format (I suppose content-type is application/pdf, and it is an octet stream). WHY do you wish to convert it to base64? With nodejs it is pretty straightforward, but if you are converting it to ASCII, can we make sure you doing so for a good reason.

  • Attributes with a Value Representation of AT shall be restricted to eight character uppercase hexadecimal representation of a DICOM Tag

Table F.2.3-1. DICOM VR to JSON Data Type Mapping

VR Name

Type

JSON Data Type

AE

Application Entity

String

AS

Age String

String

AT

Attribute Tag

String

CS

Code String

String

DA

Date

String

DS

Decimal String

Number or String

See note.

DT

Date Time

String

FL

Floating Point Single

Number

FD

Floating Point Double

Number

IS

Integer String

Number or String

See note.

LO

Long String

String

LT

Long Text

String

OB

Other Byte

Base64 encoded octet-stream

OD

Other Double

Base64 encoded octet-stream

OF

Other Float

Base64 encoded octet-stream

OL

Other Long

Base64 encoded octet-stream

OV

Other 64-bit Very Long

Base64 encoded octet-stream

OW

Other Word

Base64 encoded octet-stream

PN

Person Name

Object containing Person Name component groups as strings (see Section F.2.2)

SH

Short String

String

SL

Signed Long

Number

SQ

Sequence of Items

Array containing DICOM JSON Objects

SS

Signed Short

Number

ST

Short Text

String

SV

Signed 64-bit Very Long

Number or String

See Note.

TM

Time

String

UC

Unlimited Characters

String

UI

Unique Identifier (UID)

String

UL

Unsigned Long

Number

UN

Unknown

Base64 encoded octet-stream

UR

Universal Resource Identifier or Universal Resource Locator (URI/URL)

String

US

Unsigned Short

Number

UT

Unlimited Text

String

UV

Unsigned 64-bit Very Long

Number or String.

See Note.


Note

For IS, DS, SV and UV, a JSON String representation can be used to preserve the original format during transformation of the representation, or if needed to avoid losing precision of a decimal string.

Although data, such as dates, are represented in the DICOM JSON model as strings, it is expected that they will be treated in the same manner as the original attribute as defined by Chapter 6 in PS3.6.