dcmj2pnm in shellscript running on cygwin

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jberger
Posts: 30
Joined: Thu, 2015-09-03, 09:36

dcmj2pnm in shellscript running on cygwin

#1 Post by jberger »

Hello,

I'm new on this board.

I wrote a shell script running smoothly on Mac OS X an d Linux, converting Ultrasound single/multiframe images into TIF images and QT movies with anonymizing patients name from images. I was asked to port my script to Windows, so I installed cygwin on a XP machine. Testing this works partially, but I get an error message in cygwin terminal:

Code: Select all

berje1@WS19101 /cygdrive/c/Dokumente und Einstellungen/berje1/.dcm2mov
$ ./bin/dcmj2pnm +Fa +op -O --log-level info i0000_0000b.dcm '/cygdrive/c/Dokumente und Einstellungen/berje1/.dcm2mov/mf/mf'
I: reading DICOM file: i0000_0000b.dcm
I: preparing pixel data
I: writing frame 1 to /cygdrive/c/Dokumente und Einstellungen/berje1/.dcm2mov/mf/mf.0.ppm
F: cannot create file /cygdrive/c/Dokumente und Einstellungen/berje1/.dcm2mov/mf/mf.0.ppm
It seems to be a problem interpreting the cygwin path.

Any idea?

Best regards,

J. Berger

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: dcmj2pnm in shellscript running on cygwin

#2 Post by Jan Schlamelcher »

Maybe the spaces in the path are at fault? Perhaps try escaping them with '\' additionally to putting them in quotes or use a different path for testing.

jberger
Posts: 30
Joined: Thu, 2015-09-03, 09:36

Re: dcmj2pnm in shellscript running on cygwin

#3 Post by jberger »

Jan,

thank you very much. I reworked the path handling and it works now.

Best regards.

JB

Post Reply

Who is online

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