跳到主要內容

dcmj2pnm (1) - Linux Man Pages

dcmj2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP

 

NAME

dcmj2pnm - Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP  

SYNOPSIS



dcmj2pnm [options] dcmfile-in [bitmap-out]

DESCRIPTION

The dcmj2pnm utility reads a DICOM image, converts the pixel data according to the selected image processing options and writes back an image in the well-known PGM/PPM (portable gray map / portable pix map), PNG, TIFF, JPEG (Joint Photographic Experts Group) or Windows BMP format. This utility supports uncompressed as well as JPEG and RLE compressed DICOM images.  

PARAMETERS



dcmfile-in  DICOM input filename to be converted

bitmap-out  output filename to be written (default: stdout)

OPTIONS


general options


  -h    --help
          print this help text and exit

        --version
          print version information and exit

        --arguments
          print expanded command line arguments

  -q    --quiet
          quiet mode, print no warnings and errors

  -v    --verbose
          verbose mode, print processing details

  -d    --debug
          debug mode, print debug information

  -ll   --log-level  [l]evel: string constant
          (fatal, error, warn, info, debug, trace)
          use level l for the logger

  -lc   --log-config  [f]ilename: string
          use config file f for the logger

input options


input file format:

  +f    --read-file
          read file format or data set (default)

  +fo   --read-file-only
          read file format only

  -f    --read-dataset
          read data set without file meta information

input transfer syntax:

  -t=   --read-xfer-auto
          use TS recognition (default)

  -td   --read-xfer-detect
          ignore TS specified in the file meta header

  -te   --read-xfer-little
          read with explicit VR little endian TS

  -tb   --read-xfer-big
          read with explicit VR big endian TS

  -ti   --read-xfer-implicit
          read with implicit VR little endian TS

image processing options


frame selection:

  +F    --frame  [n]umber: integer
          select specified frame (default: 1)

  +Fr   --frame-range  [n]umber [c]ount: integer
          select c frames beginning with frame n

  +Fa   --all-frames
          select all frames

rotation:

  +Rl   --rotate-left
          rotate image left (-90 degrees)

  +Rr   --rotate-right
          rotate image right (+90 degrees)

  +Rtd  --rotate-top-down
          rotate image top-down (180 degrees)

flipping:

  +Lh   --flip-horizontally
          flip image horizontally

  +Lv   --flip-vertically
          flip image vertically

  +Lhv  --flip-both-axes
          flip image horizontally and vertically

scaling:

  +a    --recognize-aspect
          recognize pixel aspect ratio (default)

  -a    --ignore-aspect
          ignore pixel aspect ratio when scaling

  +i    --interpolate  [n]umber of algorithm: integer
          use interpolation when scaling (1..4, default: 1)

  -i    --no-interpolation
          no interpolation when scaling

  -S    --no-scaling
          no scaling, ignore pixel aspect ratio (default)

  +Sxf  --scale-x-factor  [f]actor: float
          scale x axis by factor, auto-compute y axis

  +Syf  --scale-y-factor  [f]actor: float
          scale y axis by factor, auto-compute x axis

  +Sxv  --scale-x-size  [n]umber: integer
          scale x axis to n pixels, auto-compute y axis

  +Syv  --scale-y-size  [n]umber: integer
          scale y axis to n pixels, auto-compute x axis

color space conversion (compressed images only):

  +cp   --conv-photometric
          convert if YCbCr photometric interpretation (default)

  +cl   --conv-lossy
          convert YCbCr to RGB if lossy JPEG

  +cg   --conv-guess
          convert to RGB if YCbCr is guessed by library

  +cgl  --conv-guess-lossy
          convert to RGB if lossy JPEG and YCbCr is
          guessed by the underlying JPEG library

  +ca   --conv-always
          always convert YCbCr to RGB

  +cn   --conv-never
          never convert color space

modality LUT transformation:

  -M    --no-modality
          ignore stored modality LUT transformation

  +M    --use-modality
          use modality LUT transformation (default)

VOI LUT transformation:

  -W    --no-windowing
          no VOI windowing (default)

  +Wi   --use-window  [n]umber: integer
          use the n-th VOI window from image file

  +Wl   --use-voi-lut  [n]umber: integer
          use the n-th VOI look up table from image file

  +Wm   --min-max-window
          compute VOI window using min-max algorithm

  +Wn   --min-max-window-n
          compute VOI window using min-max algorithm,
          ignoring extreme values

  +Wr   --roi-min-max-window  [l]eft [t]op [w]idth [h]eight: integer
          compute ROI window using min-max algorithm,
          region of interest is specified by l,t,w,h

  +Wh   --histogram-window  [n]umber: integer
          compute VOI window using Histogram algorithm,
          ignoring n percent

  +Ww   --set-window  [c]enter [w]idth: float
          compute VOI window using center c and width w

  +Wfl  --linear-function
          set VOI LUT function to LINEAR

  +Wfs  --sigmoid-function
          set VOI LUT function to SIGMOID

presentation LUT transformation:

  +Pid  --identity-shape
          set presentation LUT shape to IDENTITY

  +Piv  --inverse-shape
          set presentation LUT shape to INVERSE

  +Pod  --lin-od-shape
          set presentation LUT shape to LIN OD

overlay:

  -O    --no-overlays
          do not display overlays

  +O    --display-overlay  [n]umber: integer
          display overlay n (0..16, 0=all, default: +O 0)

  +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)

display LUT transformation:

  +Dm   --monitor-file  [f]ilename: string
          calibrate output according to monitor characteristics
          defined in f

  +Dp   --printer-file  [f]ilename: string
          calibrate output according to printer characteristics
          defined in f

  +Da   --ambient-light  [a]mbient light: float
          ambient light value (cd/m^2, default: file f)

  +Di   --illumination  [i]llumination: float
          illumination value (cd/m^2, default: file f)

  +Dn   --min-density  [m]inimum optical density: float
          Dmin value (default: off, only with +Dp)

  +Dx   --max-density  [m]aximum optical density: float
          Dmax value (default: off, only with +Dp)

  +Dg   --gsd-function
          use GSDF for calibration (default for +Dm/+Dp)

  +Dc   --cielab-function
          use CIELAB function for calibration

compatibility:

  +Ma   --accept-acr-nema
          accept ACR-NEMA images without photometric
          interpretation

  +Mp   --accept-palettes
          accept incorrect palette attribute tags
          (0028,111x) and (0028,121x)

  +Mc   --check-lut-depth
          check 3rd value of the LUT descriptor, compare
          with expected bit depth based on LUT data

  +Mm   --ignore-mlut-depth
          ignore 3rd value of the modality LUT descriptor,
          determine bits per table entry automatically

  +Mv   --ignore-vlut-depth
          ignore 3rd value of the VOI LUT descriptor,
          determine bits per table entry automatically

TIFF format:

  +Tl   --compr-lzw
          LZW compression (default)

  +Tr   --compr-rle
          RLE compression

  +Tn   --compr-none
          uncompressed

  +Pd   --predictor-default
          no LZW predictor (default)

  +Pn   --predictor-none
          LZW predictor 1 (no prediction)

  +Ph   --predictor-horz
          LZW predictor 2 (horizontal differencing)

  +Rs   --rows-per-strip  [r]ows: integer (default: 0)
          rows per strip, default 8K per strip

PNG format:

  +il   --interlace
          create interlaced file (default)

  -il   --nointerlace
          create non-interlaced file

  +mf   --meta-file
          create PNG file meta information (default)

  -mf   --meta-none
          no PNG file meta information

JPEG format:

  +Jq   --compr-quality  [q]uality: integer (0..100, default: 90)
          quality value for compression (in percent)

  +Js4  --sample-444
          4:4:4 sampling (no subsampling)

  +Js2  --sample-422
          4:2:2 subsampling (horizontal subsampling of
          chroma components, default)

  +Js1  --sample-411
          4:1:1 subsampling (horizontal and vertical
          subsampling of chroma components)

other transformations:

  +G    --grayscale
          convert to grayscale if necessary

  +P    --change-polarity
          change polarity (invert pixel output)

  +C    --clip-region  [l]eft [t]op [w]idth [h]eight: integer
          clip image region (l, t, w, h)

output options


general:

  -im   --image-info
          print image details (requires verbose mode)

  -o    --no-output
          do not create any output (useful with -im)

image format:

  +op   --write-raw-pnm
          write 8-bit binary PGM/PPM (default for files)

  +opb  --write-8-bit-pnm
          write 8-bit ASCII PGM/PPM (default for stdout)

  +opw  --write-16-bit-pnm
          write 16-bit ASCII PGM/PPM

  +opn  --write-n-bit-pnm  [n]umber: integer
          write n-bit ASCII PGM/PPM (1..32)

  +ob   --write-bmp
          write 8-bit (monochrome) or 24-bit (color) BMP

  +obp  --write-8-bit-bmp
          write 8-bit palette BMP (monochrome only)

  +obt  --write-24-bit-bmp
          write 24-bit truecolor BMP

  +obr  --write-32-bit-bmp
          write 32-bit truecolor BMP

  +ot   --write-tiff
          write 8-bit (monochrome) or 24-bit (color) TIFF

  +on   --write-png
          write 8-bit (monochrome) or 24-bit (color) PNG

  +oj   --write-jpeg
          write 8-bit lossy JPEG (baseline)

NOTES

The following preferred interpolation algorithms can be selected using the --interpolate option:

1 = free scaling algorithm with interpolation from pbmplus toolkit
2 = free scaling algorithm with interpolation from c't magazine
3 = magnification algorithm with bilinear interpolation from Eduard Stanescu
4 = magnification algorithm with bicubic interpolation from Eduard Stanescu
The --write-tiff option is only available when DCMTK has been configured and compiled with support for the external libtiff TIFF library. The availability of the TIFF compression options depends on the libtiff configuration. In particular, the patented LZW algorithm may not be available.
The --write-png option is only available when DCMTK has been configured and compiled with support for the external libpng PNG library. Option --interlace enables progressive image view while loading the PNG file. Only a few applications take care of the meta info (TEXT) in a PNG file.  

TRANSFER SYNTAXES

dcmj2pnm supports the following transfer syntaxes for input (dcmfile-in):


LittleEndianImplicitTransferSyntax             1.2.840.10008.1.2
LittleEndianExplicitTransferSyntax             1.2.840.10008.1.2.1
DeflatedExplicitVRLittleEndianTransferSyntax   1.2.840.10008.1.2.1.99 (*)
BigEndianExplicitTransferSyntax                1.2.840.10008.1.2.2
JPEGProcess1TransferSyntax                     1.2.840.10008.1.2.4.50
JPEGProcess2_4TransferSyntax                   1.2.840.10008.1.2.4.51
JPEGProcess6_8TransferSyntax                   1.2.840.10008.1.2.4.53
JPEGProcess10_12TransferSyntax                 1.2.840.10008.1.2.4.55
JPEGProcess14TransferSyntax                    1.2.840.10008.1.2.4.57
JPEGProcess14SV1TransferSyntax                 1.2.840.10008.1.2.4.70
RLELosslessTransferSyntax                      1.2.840.10008.1.2.5

(*) if compiled with zlib support enabled  

LOGGING

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

COMMAND LINE

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

ENVIRONMENT

The dcmj2pnm utility will attempt to load DICOM data dictionaries specified in the DCMDICTPATH environment variable. By default, i.e. if the DCMDICTPATH environment variable is not set, the file /dicom.dic will be loaded unless the dictionary is built into the application (default for Windows).
The default behaviour should be preferred and the DCMDICTPATHenvironment variable only used when alternative data dictionaries are required. The DCMDICTPATH environment variable has the same format as the Unix shell PATH variable in that a colon (':') separates entries. On Windows systems, a semicolon (';') is used as a separator. The data dictionary code will attempt to load each file specified in the DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded.  

FILES

/camera.lut - sample characteristics file of a camera
/monitor.lut - sample characteristics file of a monitor
/printer.lut - sample characteristics file of a printer
/scanner.lut - sample characteristics file of a scanner  

SEE ALSO

dcm2pnm(1), img2dcm(1)  

COPYRIGHT

Copyright (C) 2001-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.

留言

這個網誌中的熱門文章

opencv4nodejs Asynchronous OpenCV 3.x Binding for node.js   122     2715     414   0   0 Author Contributors Repository https://github.com/justadudewhohacks/opencv4nodejs Wiki Page https://github.com/justadudewhohacks/opencv4nodejs/wiki Last Commit Mar. 8, 2019 Created Aug. 20, 2017 opencv4nodejs           By its nature, JavaScript lacks the performance to implement Computer Vision tasks efficiently. Therefore this package brings the performance of the native OpenCV library to your Node.js application. This project targets OpenCV 3 and provides an asynchronous as well as an synchronous API. The ultimate goal of this project is to provide a comprehensive collection of Node.js bindings to the API of OpenCV and the OpenCV-contrib modules. An overview of available bindings can be found in the  API Documentation . Furthermore, contribution is highly appreciated....

2017通訊大賽「聯發科技物聯網開發競賽」決賽團隊29強出爐!作品都在11月24日頒獎典禮進行展示

2017通訊大賽「聯發科技物聯網開發競賽」決賽團隊29強出爐!作品都在11月24日頒獎典禮進行展示 LIS   發表於 2017年11月16日 10:31   收藏此文 2017通訊大賽「聯發科技物聯網開發競賽」決賽於11月4日在台北文創大樓舉行,共有29個隊伍進入決賽,角逐最後的大獎,並於11月24日進行頒獎,現場會有全部進入決賽團隊的展示攤位,總計約為100個,各種創意作品琳琅滿目,非常值得一看,這次錯過就要等一年。 「聯發科技物聯網開發競賽」決賽持續一整天,每個團隊都有15分鐘面對評審團做簡報與展示,並接受評審們的詢問。在所有團隊完成簡報與展示後,主辦單位便統計所有評審的分數,並由評審們進行審慎的討論,決定冠亞季軍及其他各獎項得主,結果將於11月24日的「2017通訊大賽頒獎典禮暨成果展」現場公佈並頒獎。 在「2017通訊大賽頒獎典禮暨成果展」現場,所有入圍決賽的團隊會設置攤位,總計約為100個,展示他們辛苦研發並實作的作品,無論是想觀摩別人的成品、了解物聯網應用有那些新的創意、尋找投資標的、尋找人才、尋求合作機會或是單純有興趣,都很適合花點時間到現場看看。 頒獎典禮暨成果展資訊如下: 日期:2017年11月24日(星期五) 地點:中油大樓國光廳(台北市信義區松仁路3號) 我要報名參加「2017通訊大賽頒獎典禮暨成果展」>>> 在參加「2017通訊大賽頒獎典禮暨成果展」之前,可以先在本文觀看各團隊的作品介紹。 決賽29強團隊如下: 長者安全救星 可隨意描繪或書寫之電子筆記系統 微觀天下 體適能訓練管理裝置 肌少症之行走速率檢測系統 Sugar Robot 賽亞人的飛機維修輔助器 iTemp你的溫度個人化管家 語音行動冰箱 MR模擬飛行 智慧防盜自行車 跨平台X-Y視覺馬達控制 Ironmet 菸消雲散 無人小艇 (Mini-USV) 救OK-緊急救援小幫手 穿戴式長照輔助系統 應用於教育之模組機器人教具 這味兒很台味 Aquarium Hub 發展遲緩兒童之擴增實境學習系統 蚊房四寶 車輛相控陣列聲納環境偵測系統 戶外團隊運動管理裝置 懷舊治療數位桌曆 SeeM智能眼罩 觸...
2019全台精選3+個燈會,週邊順遊景點懶人包 2019燈會要去哪裡看?全台精選3+個燈會介紹、週邊順遊景點整理給你。 東港小鎮燈區-鮪鮪到來。 2019-02-15 微笑台灣編輯室 全台灣 各縣市政府 1435 延伸閱讀 ►  元宵節不只看燈會!全台元宵祭典精選、順遊景點整理 [屏東]2019台灣燈會在屏東 2/9-3/3:屏東市 · 東港鎮 · 大鵬灣國家風景區 台灣燈會自1990年起開始辦理,至2019年邁入第30週年,也是首次在屏東舉辦,屏東縣政府與交通部觀光局導入創新、科技元素,融入在地特色文化設計,在東港大鵬灣國家風景區打造廣闊的海洋灣域燈區,東港鎮結合漁港及宗教文化的小鎮燈區,及屏東市綿延近5公里長的綵燈節河岸燈區,讓屏東成為璀璨的光之南國,迎向國際。 詳細介紹 ►  2019台灣燈會在屏東 第一次移師國境之南 大鵬灣燈區 主題樂園式燈會也是主燈所在區,區內分為農業海洋燈區、客家燈區、原住民燈區、綠能環保燈區、藝術燈區、宗教燈區、競賽花燈及317個社區關懷據點手作的萬歲光廊等。 客家燈籠隧道。 平日:周一~周四14:00-22:30(熄燈) 假日:周五~周六10:00-22:30(熄燈)  屏東燈區: 萬年溪畔 屏東綵燈節藍區-生態。 綵燈節--每日17:30 - 22:00(熄燈) 勝利星村--平日:14:00 - 22:30(熄燈) 假日:10:00 - 22:30(熄燈) 燈區以「彩虹」為主題,沿著蜿蜒市區的萬年溪打造近5公里長的光之流域,50組水上、音樂及互動科技等不同類型燈飾,呈現紅色熱情、橙色活力、黃色甜美、綠色雄偉、藍色壯闊、靛色神祕、紫色華麗等屏東風情。勝利星村另有懷舊風的燈飾,及屏東公園聖誕節燈飾。 東港小鎮燈區 東港小鎮燈區-鮪鮪到來。 小鎮燈區以海的屏東為主題,用漁港風情及宗教文化內涵規劃4個主題區,分別為張燈結綵趣、東津好風情、神遊幸福海、延平老街區。每日17:00~22:30(熄燈) 以上台灣燈會資料來源: 2019台灣燈會官網 、 i屏東~愛屏東 。 >> 順遊行程 小吃旅行-東港小鎮 東港小吃和東港人一樣,熱情澎湃...