My aim is to add some annotations (for example, lines, arrows, shapes, or textual annotations) to a DICOM image with an opportunity to hide them and bring back when needed.
I have found two ways to accomplish it. One is to use the Overlay Plane module, but it does not fully satisfy our needs as our software requires annotations to be color. So I found another opportunity: different kinds of Softcopy Presentation State IOD-s.
As much as I understand by now, Grayscale Softcopy Presentation State IOD is most widely used. However, the word "grayscale" confuses me. Despite it is grayscale, the Graphic Annotation module contains attributes to pass information about the color of annotations, for instance, Text Color CIELab Value and Pattern On Color CIELab Value.
There are also other Softcopy Presentation State IOD-s: Color Softcopy Presentation State IOD, Pseudo-color Softcopy Presentation State IOD, and others.
Using Grayscale Softcopy Presentation State IOD I have created a presentation state file (with the .pre extension). I have tested it with Weasis DICOM viewer and it worked fine. All needed annotations were in the right places and almost all colors were right.
Now I am searching for information on how .pre files could be passed to a hypothetical PACS server, but it is not the topic of my post. Here I found the next information:
The grayscale softcopy presentation state refers to the grayscale image transformations that are to be applied in an explicitly defined manner to convert the stored image pixel data values in a Composite Image Instance to presentation values (P-Values) when an image is displayed on a softcopy device.
The color and pseudo-color softcopy presentation states refer to the color image transformations that are to be applied in an explicitly defined manner to convert the stored image pixel data values in a Composite Image Instance to Profile Connection Space values (PCS-Values) when an image is displayed on a softcopy device.
So I am a little bit confused. What kind of softcopy presentation state should be used in this situation?
The word "Grayscale" and "Color" refer to the images handled (i.e. referenced) by the presentation state object. Apart from vector graphics that you are aiming at, the presentation state also defines (among other aspects like shutters, 2D transformations etc.) the transformation of pixel values stored in the DICOM object to so-called P-Values which can be considered as display-independent intensity values which can be displayed on a calibrated device. This obviously depends on the format of the pixel data in the source objects, i.e. Grayscale/Color.
So the choice of the presentation state object you want to use solely depends on the type of images it is supposed to handle.