Question about graphics coordinates in presentation states

All other questions regarding DICOMscope

Moderator: Moderator Team

Post Reply
Message
Author
seandoyle
Posts: 1
Joined: Thu, 2022-09-29, 09:07

Question about graphics coordinates in presentation states

#1 Post by seandoyle » Thu, 2022-09-29, 22:12

Hi -

I'm seeing some inconsistencies between DICOMScope and other viewers (Weasis, Osiris, and some commercial viewers) and I think that DICOMScope is not drawing graphics in the correct location (but I've been wrong before!). I've created a sample image (256x256, black image with grid lines at 16 pixel intervals) and a presentation state containing a square over part of the grid and a diagonal line between the corners of the square. In Weasis/Osirix the upper left corner is on pixel (15, 15) but in DICOMScope it is offset. I've included the DICOM image, presentation state part 10, and two screenshots of DICOMScope and Weasis.

Can someone look at these images and if DICOMScope is correct - could you explain to me why? It's a very simple presentation state object. Right now the graphic overlays are offset about 2.5 pixels horizontally and vertically.

The coordinates for the square are here:
(fffe,e000) na (Item with defined length)
(0062,0020) UT [Finding1] # 8,1 Tracking ID
(0062,0021) UI [1.2.826.0.1.3680043.10.511.3.14082892298850229997220446598253092] # 64,1 Tracking UID
(0070,0005) CS [PIXEL ] # 6,1 Graphic Annotation Units
(0070,0020) US 2 # 2,1 Graphic Dimensions
(0070,0021) US 5 # 2,1 Number of Graphic Points
(0070,0022) FL 15\15\15\239\239\239\239\15\15\15 # 40,2-n Graphic Data
(0070,0023) CS [POLYLINE] # 8,1 Graphic Type
(0070,0024) CS [N ] # 2,1 Graphic Filled

The files are here: [https://drive.google.com/drive/folders/ ... sp=sharing][/https://drive.google.com/drive/folders/ ... sp=sharing]

A second question: if I change the PixelSpacing so that the pixels are not square I see a lot of variation between viewers. But shouldn't the presentation state overlays be on the same portions of the grid since the Graphic Annotation Units are 'PIXEL' and should be independent of the PixelSpacing?

Thanks!

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1360
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: Question about graphics coordinates in presentation states

#2 Post by Marco Eichelberg » Fri, 2022-10-14, 16:56

I agree that this is a bug in DICOMscope. The overlay seems to be offset by about two pixels horizontally and vertically. Even worse, when you rotate the image, the offset seems to change between 0 and 2 pixels.
Unfortunately, this rendering of graphical overlays is part of DICOMscope's Java layer and that code has been unmaintained for the last 20+ years.

With regard to your second question: If you change the Pixel Spacing in the image, the display should not change at all, because the presentation state contains the "Presentation Pixel Aspect Ratio" in the "Displayed Area Selection Sequence", and that overrides the Pixel Aspect Ratio or Pixel Spacing defined in the image. No matter which of these values you change, however, the overlay should indeed always cover the same pixels, since it is defined in PIXEL units.

This shows that DICOM viewers that support GSPS often do not fully and correctly implement all GSPS features. This is also my experience.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest