Dicom.SR.Scoord3D (Dicom v0.9.1)

Copy Markdown View Source

Three-dimensional spatial coordinate reference for SR content items.

Unlike Scoord2D, which references an image via a SOP reference, Scoord3D coordinates are in the patient coordinate system (mm) and reference a Frame of Reference UID instead.

Reference: DICOM PS3.3 Section C.18.9 (3D Spatial Coordinates Macro).

Summary

Functions

Creates a new 3D spatial coordinate with validation.

Types

t()

@type t() :: %Dicom.SR.Scoord3D{
  frame_of_reference_uid: String.t(),
  graphic_data: [number()],
  graphic_type: String.t()
}

Functions

new(graphic_type, graphic_data, frame_of_reference_uid)

@spec new(String.t(), [number()], String.t()) :: t()

Creates a new 3D spatial coordinate with validation.

Parameters

  • graphic_type — one of POINT, MULTIPOINT, POLYLINE, POLYGON, ELLIPSE, ELLIPSOID
  • graphic_data — list of coordinate triples (x, y, z) in mm
  • frame_of_reference_uid — Referenced Frame of Reference UID (3006,0024)

Validation rules

  • POINT: exactly 3 values (one triple)
  • MULTIPOINT: divisible by 3, minimum 3
  • POLYLINE: divisible by 3, minimum 6
  • POLYGON: divisible by 3, minimum 9
  • ELLIPSE: exactly 12 values (4 points)
  • ELLIPSOID: exactly 18 values (6 points)