Export viewport state (GSPS)
Save window/level, zoom and the annotations on the image as a GSPS file.
Export Viewport State (GSPS) in the Export menu saves a Grayscale Softcopy Presentation State: a separate DICOM file (modality PR) that tells a viewer how to show the image on screen in the active viewport. The image file itself is not changed.
The file refers to the slice you are looking at. If you scroll through a series and export, the GSPS belongs to the slice on screen, not to the one selected in the study tree. On a multi-frame image it also records the frame on screen.
The file holds:
- the window/level, in the Softcopy VOI LUT Sequence;
- the zoom, as the displayed area of the image (the image centred and scaled to fit, so 200% shows the middle half of each axis);
- the image’s rescale slope and intercept, and an identity presentation LUT (inverse for a MONOCHROME1 image);
- a content label (
VIEWPORT_STATE), a description and the creation date and time; - the annotations drawn on that image: length, angle, ellipse, bidirectional, probe, arrow and Cobb angle. Each one is written as graphics on a layer named
MEASUREMENTS, in the image’s pixel coordinates, with a text object that carries the value the Annotations tab shows (12.3 mm,45.0°, the arrow’s label). Each annotation is its own graphic group, labelled with its tool.
These are the places the DICOM standard defines, so other viewers that support presentation states apply the window/level and zoom. On a multi-frame image, each annotation refers to the frame it was drawn on.
What is left out
- Pan. The displayed area is always centred on the image.
- Annotations on other images. In a series, a measurement on another slice is not written. Scroll to that slice and export again.
- Redaction boxes and RT structure contours.
- Annotations in MPR planes that do not lie on a stored image.
Annotations never go into the pixel data of any export.
Loading a GSPS
When you open a GSPS together with its images, or import it into a session that already has them, dcmage shows the slice (and frame) it refers to, applies its window/level and zoom, and draws its graphics as annotations you can see, edit and export again. A GSPS that dcmage wrote before version 1.4.0, which kept window/level and zoom outside these sequences, still applies.
From another system’s GSPS, dcmage draws two-point lines as lengths, three-point lines as angles, points as probes and ellipses that run along the image axes as ellipses. It cannot draw circles, curves, longer lines, free text or graphics in display units; a notice says how many were left out. A zoom given as a magnification or true size depends on the other viewer’s screen, so dcmage keeps its own zoom then.