Question about dcmtk - dcm2pnm v3.6.5(Unix)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Ricky Yang
Posts: 5
Joined: Thu, 2020-08-06, 07:28

Question about dcmtk - dcm2pnm v3.6.5(Unix)

#1 Post by Ricky Yang » Thu, 2020-08-06, 20:05

I want to use Unix version dcm2pnm v3.6.5 to transfer DICOM file to PNG file in Unix.
However, the following parameter is only support Windows version dcm2pnm. Under Unix, the parameter does not work for Unix version dcm2pnm

+on2 --write-16-bit-png
write 16-bit (monochrome) or 48-bit (color) PNG

Under Unix:
% ./dcm2pnm -h
$dcmtk: dcm2pnm v3.6.5 2019-10-28 $dcm2pnm: Convert DICOM images to PGM/PPM or BMP(Not support PNG)

My question about the Unix version dcm2pnm v3.6.5:

Where can I find Unix version dcm2pnm which supports transferring DICOM file to PNG file?

J. Riesmeier
DCMTK Developer
Posts: 2244
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Question about dcmtk - dcm2pnm v3.6.5(Unix)

#2 Post by J. Riesmeier » Thu, 2020-08-06, 21:12

Then your version of dcm2pnm has not been compiled with libpng support enabled. See output of "dcm2pnm --version".

Ricky Yang
Posts: 5
Joined: Thu, 2020-08-06, 07:28

Re: Question about dcmtk - dcm2pnm v3.6.5(Unix)

#3 Post by Ricky Yang » Thu, 2020-08-06, 21:46

Thanks for the reply, then how do I compile the libpng support enabled to create dcm2pnm supporting png?

I ran the command, it shows:
./dcm2pnm --version
$dcmtk: dcm2pnm v3.6.5 2019-10-28 $

dcm2pnm: Convert DICOM images to PGM/PPM or BMP

Host type: x86_64-unknown-linux-gnu
Character encoding: system default (unknown)

External libraries used: none

J. Riesmeier
DCMTK Developer
Posts: 2244
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Question about dcmtk - dcm2pnm v3.6.5(Unix)

#4 Post by J. Riesmeier » Fri, 2020-08-07, 11:02

All information should be available from the INSTALL. Depending on your Unix system (e.g. Linux distribution), you need to install the "libpng-dev" package first.

Ricky Yang
Posts: 5
Joined: Thu, 2020-08-06, 07:28

Re: Question about dcmtk - dcm2pnm v3.6.5(Unix)

#5 Post by Ricky Yang » Sat, 2020-08-08, 01:22

Thank you J. Riesmeier, after I installed libpng-dev and reinstalled dcmtk, dcm2pnm is able to convert dicom to png. :)

Post Reply

Who is online

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