1dcmp2pgm(1)                       OFFIS DCMTK                      dcmp2pgm(1)
2
3
4

NAME

6       dcmp2pgm - Read DICOM image and presentation state and render bitmap
7
8

SYNOPSIS

10       dcmp2pgm [options] dcmimage-in [bitmap-out]
11

DESCRIPTION

13       The dcmp2pgm utility renders a monochrome DICOM image under the control
14       of a grayscale softcopy presentation state  object  into  a  monochrome
15       bitmap with 8 bits/pixel. The bitmap is stored either as 'Portable Gray
16       Map' (PGM) or  as  a  DICOM  secondary  capture  image  object.  If  no
17       presentation  state  is read from file, a default presentation state is
18       created. The utility allows one to read a  configuration  file  of  the
19       Softcopy  Presentation  State  Viewer  upon  startup. In this case, the
20       settings from the configuration file affecting  the  rendering  of  the
21       presentation  state are used, e.g. a correction of the gray scale range
22       according to Barten's model (DICOM part 14) can  be  performed  if  the
23       characteristic  curve of the display system is available and defined in
24       the configuration file.
25

PARAMETERS

27       dcmimage-in  input DICOM image
28
29       bitmap-out   output DICOM image or PGM bitmap
30

OPTIONS

32   general options
33         -h   --help
34                print this help text and exit
35
36              --version
37                print version information and exit
38
39              --arguments
40                print expanded command line arguments
41
42         -q   --quiet
43                quiet mode, print no warnings and errors
44
45         -v   --verbose
46                verbose mode, print processing details
47
48         -d   --debug
49                debug mode, print debug information
50
51         -ll  --log-level  [l]evel: string constant
52                (fatal, error, warn, info, debug, trace)
53                use level l for the logger
54
55         -lc  --log-config  [f]ilename: string
56                use config file f for the logger
57
58   processing options
59         -p   --pstate  [f]ilename: string
60                process using presentation state file
61
62         -c   --config  [f]ilename: string
63                process using settings from configuration file
64
65         -f   --frame  [f]rame: integer
66                process using image frame f (default: 1)
67
68   output format
69         -D   --pgm
70                save image as PGM (default)
71
72         +D   --dicom
73                save image as DICOM secondary capture
74
75   output options
76         +S   --save-pstate  [f]ilename: string
77                save presentation state to file
78

NOTES

80   Limitations
81       Please note that the dcmp2pgm tool does not render all aspects that are
82       defined  by the Grayscale Softcopy Presentation State (GSPS) object but
83       only those that are supported  by  the  underlying  DCMTK  classes.  In
84       particular,  textual  and  graphical annotations will not be visible in
85       the output image. The reason is that these aspects of a GSPS object are
86       typically  rendered by DICOMscope, the graphical user interface that is
87       put on top of the related DCMTK classes and written in Java.
88
89       Also concepts that were introduced after the initial definition of  the
90       GSPS  IOD (see Supplement 33) are ignored. This includes Supplement 120
91       with its extended features like e.g. Compound Graphics.
92

LOGGING

94       The level of logging output of  the  various  command  line  tools  and
95       underlying  libraries  can  be  specified by the user. By default, only
96       errors and warnings are written to the  standard  error  stream.  Using
97       option  --verbose  also  informational messages like processing details
98       are reported. Option --debug can be used to get  more  details  on  the
99       internal  activity,  e.g.  for debugging purposes. Other logging levels
100       can be selected using option --log-level. In --quiet  mode  only  fatal
101       errors  are reported. In such very severe error events, the application
102       will usually terminate. For  more  details  on  the  different  logging
103       levels, see documentation of module 'oflog'.
104
105       In  case  the logging output should be written to file (optionally with
106       logfile rotation), to syslog (Unix) or the event log  (Windows)  option
107       --log-config  can  be  used.  This  configuration  file also allows for
108       directing only certain messages to a particular output stream  and  for
109       filtering  certain  messages  based  on the module or application where
110       they are generated.  An  example  configuration  file  is  provided  in
111       <etcdir>/logger.cfg.
112

COMMAND LINE

114       All  command  line  tools  use  the  following notation for parameters:
115       square brackets enclose optional  values  (0-1),  three  trailing  dots
116       indicate  that multiple values are allowed (1-n), a combination of both
117       means 0 to n values.
118
119       Command line options are distinguished from parameters by a leading '+'
120       or  '-' sign, respectively. Usually, order and position of command line
121       options are arbitrary (i.e. they  can  appear  anywhere).  However,  if
122       options  are  mutually exclusive the rightmost appearance is used. This
123       behavior conforms to the  standard  evaluation  rules  of  common  Unix
124       shells.
125
126       In  addition,  one  or more command files can be specified using an '@'
127       sign as a prefix to the filename (e.g. @command.txt).  Such  a  command
128       argument  is  replaced  by  the  content of the corresponding text file
129       (multiple whitespaces are treated as a  single  separator  unless  they
130       appear  between  two  quotation marks) prior to any further evaluation.
131       Please note that a command file cannot contain  another  command  file.
132       This  simple  but  effective  approach  allows  one to summarize common
133       combinations of options/parameters and  avoids  longish  and  confusing
134       command lines (an example is provided in file <datadir>/dumppat.txt).
135

ENVIRONMENT

137       The  dcmp2pgm  utility  will  attempt  to  load DICOM data dictionaries
138       specified in the DCMDICTPATH environment variable. By default, i.e.  if
139       the   DCMDICTPATH   environment   variable   is   not   set,  the  file
140       <datadir>/dicom.dic will be loaded unless the dictionary is built  into
141       the application (default for Windows).
142
143       The   default   behavior   should  be  preferred  and  the  DCMDICTPATH
144       environment variable only used when alternative data  dictionaries  are
145       required.  The  DCMDICTPATH environment variable has the same format as
146       the Unix shell PATH variable in that a colon (':')  separates  entries.
147       On  Windows systems, a semicolon (';') is used as a separator. The data
148       dictionary code will  attempt  to  load  each  file  specified  in  the
149       DCMDICTPATH  environment variable. It is an error if no data dictionary
150       can be loaded.
151

FILES

153       <etcdir>/dcmpstat.cfg - sample configuration file
154
156       Copyright (C) 1998-2022 by OFFIS e.V., Escherweg  2,  26121  Oldenburg,
157       Germany.
158
159
160
161Version 3.6.7                   Fri Apr 22 2022                    dcmp2pgm(1)
Impressum