dcmj2pnm overlay data does not look right

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

dcmj2pnm overlay data does not look right

#1 Post by merlin »

Hi,

I am trying to use dcmj2pnm to convert my DICOM images into jpegs.
It works fine except for the Overlay data. I have 2 overlay planes and they look fine when I open my DICOM file with the SANTE DICOM viewer.
However, when I convert the file with dcmj2pnm, the frames that have an overlay associated with them do not look right. Overlay data looks 'scrambled'... I must be missing something.

Here is a download link to a sample DICOM file with overlay data:
http://dl.dropbox.com/u/22454822/US.X.1 ... 34.1.dicom

Overlays are on frame 90 and frame 118.

Thank you!
Merlin

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

Thank you for the report. There was indeed an issue regarding the processing of overlay planes in multi-frame images. This has been fixed now.

Btw, the second overlay plane (frame 118) is not complete and will, therefore, not be displayed. This is because the Overlay Origin (6002,0050) is missing.

merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

#3 Post by merlin »

Hi Jorg,

Does the fix only affect dcmj2pnm or does it also affect DICOM multi-frame image creation (ie I have to recreate my DICOM multi-frame images that have overlays)?

Thank you,
Merlin

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier »

It only affects the rendering/display/processing of overlay planes in DICOM multi-frame images.

merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

#5 Post by merlin »

Thank you. I will rebuild and try the fix.

Merlin

merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

#6 Post by merlin »

The fix works! :-)

I noticed that the overlays are displayed with a different color (white) when I look at images generated by dcmj2pnm, compared to the color they appear with in my DICOM viewer.

Is that normal?

Thanks,
Merlin

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#7 Post by Jörg Riesmeier »

If you are using dcmj2pnm, you've probably noticed that there are options that can be used to change the visual appearance of the overlay planes:

Code: Select all

  +Omr  --ovl-replace
          use overlay mode "Replace"
          (default for Graphic overlays)

  +Omt  --ovl-threshold
          use overlay mode "Threshold Replace"

  +Omc  --ovl-complement
          use overlay mode "Complement"

  +Omv  --ovl-invert
          use overlay mode "Invert Bitmap"

  +Omi  --ovl-roi
          use overlay mode "Region of Interest"
          (default for ROI overlays)

  +Osf  --set-foreground  [d]ensity: float
          set overlay foreground density (0..1, default: 1)

  +Ost  --set-threshold  [d]ensity: float
          set overlay threshold density (0..1, default: 0.5)
The output of color is (currently) not possible since the underlying image (i.e. graphic bitmap) is monochrome. DICOM does not specify how to display/render the overlay planes.

merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

#8 Post by merlin »

OK, thank you.

merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

overlay not showing up in Osirix...

#9 Post by merlin »

Hi,

Even though I don't get any error when I run dcmj2pnm.exe on my DICOM file, Osirix doesn't display its overlays.
I've got 2 overlays. One on frame 89 and one of frame 117.
I did turn on Overlay option on Osirix but can't see any overlay on those frames.
Is there something wrong with my DICOM file?

Here is a link to download my DICOM file:
http://dl.dropbox.com/u/22454822/US.X.1 ... 28.1.dicom

Thanks,
Merlin

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#10 Post by Jörg Riesmeier »

The overlay planes are associated with frame 90 and 118. Other than that I cannot find any abnormalities: The overlay planes are rendered as expected when using the patched version of dcmj2pnm.

You should probably ask the OsiriX people whether they support overlays in multi-frame images at all.

merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

#11 Post by merlin »

Thanks Jorg.

The overlay do show up correctly with the patched dcmj2pnm.exe.

However, I still cannot see my overlays when they are in a Color DICOM file (3 bytes per pixel).
The overlay show up fine in the SANTE viewer though but they are not rendered when using the fixed dcmj2pnm.exe.

Is it a problem with my DICOM file or another issue with dcmj2pnm when dealing with color files and multi-plane overlays?

Here is a sample DICOM file that has this problem:
http://dl.dropbox.com/u/22454822/Overla ... mage.dicom

Thank you,
Merlin

merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

#12 Post by merlin »

There are 2 overlays in the sample file I've provided: 1 on frame 2 and 1 on frame 3.

merlin

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#13 Post by Jörg Riesmeier »

The rendering of overlay planes in color images is not supported by the DicomImage class. Btw, your sample image is an instance of the UltrasoundMultiframeImageStorage SOP Class for which the Overlay Plane module is not defined in the DICOM standard (as far as I can see).

Maybe, starting to support DICOM Softcopy Presentation States would be a better solution - at least from today's perspective.

merlin
Posts: 41
Joined: Tue, 2008-03-04, 16:21

#14 Post by merlin »

Thanks.

Does dcmj2pnm.exe render Softcopy Presentation States?

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#15 Post by Jörg Riesmeier »

No, dcmp2pgm does support some aspects of Grayscale Softcopy Presentation States (because the dcmpstat module is used as an underlying library for the DICOMscope viewer).

You have to understand that the various DCMTK command line tools are basically examples on how to use the toolkit and not "fully featured" applications (although some of them are really comprehensive).

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest