⚠️ これは 非公式の翻訳サイトです。DCMTK / OFFIS とは無関係です。正確な情報は 原文(https://support.dcmtk.org/docs/dsrdump.html) を参照してください。

dsrdump: DICOM SR ファイルとデータセットをダンプする

書式

dsrdump [options] dsrfile-in...

説明

dsrdump ユーティリティは、DICOM 構造化レポート(SR)ドキュメント(ファイル形式または生のデータセット)の内容をテキスト形式で標準出力にダンプします。ドキュメント内容の出力形式は、David Clunie の著書「DICOM Structured Reporting」(PixelMed Publishing, 2000)で提案された形式に従います。

dsrdump が生のデータセット(ファイル形式のメタヘッダを持たない DICOM データ)を読み込む場合、ファイル先頭の数バイトを調べて転送構文を推定しようとします。転送構文を常に正しく推定できるとは限らないため、可能な限り(dcmconv ユーティリティを使って)データセットをファイル形式へ変換しておくほうがよいでしょう。また -f-t[ieb] オプションを使えば、特定の転送構文で読み込むよう dsrdump に強制できます。

引数

dsrfile-in  DICOM SR input filename to be dumped ("-" for stdin)

オプション

全般オプション

-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

入力オプション

+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

処理オプション

-Ip --processing-details
show currently processed content item error handling:
-Er --unknown-relationship
accept unknown/missing relationship type
-Ev --invalid-item-value
accept invalid content item value (e.g. violation of VR or VM definition)
-Ec --ignore-constraints
ignore relationship content constraints
-Ee --ignore-item-errors
do not abort on content item errors, just warn (e.g. missing value type specific attributes)
-Ei --skip-invalid-items
skip invalid content items (including sub-tree)
-Dv --disable-vr-checker
disable check for VR-conformant string values specific character set:
+U8 --convert-to-utf8
convert all element values that are affected by Specific Character Set (0008,0005) to UTF-8 # requires support from an underlying character encoding library # (see output of --version on which one is available)

出力オプション

+Pf --print-filename
print header with filename for each document
-Ph --no-document-header
do not print general document information
+Pn --number-nested-items
print position string in front of each line
-Pn --indent-nested-items
indent nested items by spaces (default) printing values:
+Pl --print-long-values
print long item values completely
-Pl --shorten-long-values
print long item values shortened (default)
+Pu --print-instance-uid
print SOP instance UID of referenced objects
-Ps --print-sopclass-short
print short SOP class name of referenced image objects, e.g. "CT image" (default)
+Ps --print-sopclass-long
print long SOP class name of referenced objects
+Psu --print-sopclass-uid
print SOP class UID of referenced objects
+Pc --print-all-codes
print all codes (including concept name codes)
+Pi --print-invalid-codes
print invalid codes (for debugging purposes)
-Pi --no-invalid-codes
print text "invalid code" instead (default)
+Pt --print-template-id
print template identification information enhanced encoding mode:
+Pe --indicate-enhanced
indicate that enhanced mode is used for codes
-Pe --no-enhanced-mode
do not indicate enhanced mode (default) color:
+C --print-color
use ANSI escape codes for colored output
-C --no-color
do not use any ANSI escape codes (default)

注記

DICOM 適合性

dsrdump ユーティリティは次の SOP クラスをサポートします。

SpectaclePrescriptionReportStorage           1.2.840.10008.5.1.4.1.1.78.6
MacularGridThicknessAndVolumeReportStorage   1.2.840.10008.5.1.4.1.1.79.1
BasicTextSRStorage                           1.2.840.10008.5.1.4.1.1.88.11
EnhancedSRStorage                            1.2.840.10008.5.1.4.1.1.88.22
ComprehensiveSRStorage                       1.2.840.10008.5.1.4.1.1.88.33
Comprehensive3DSRStorage                     1.2.840.10008.5.1.4.1.1.88.34
ProcedureLogStorage                          1.2.840.10008.5.1.4.1.1.88.40
MammographyCADSRStorage                      1.2.840.10008.5.1.4.1.1.88.50
KeyObjectSelectionDocumentStorage            1.2.840.10008.5.1.4.1.1.88.59
ChestCADSRStorage                            1.2.840.10008.5.1.4.1.1.88.65
XRayRadiationDoseSRStorage                   1.2.840.10008.5.1.4.1.1.88.67
RadiopharmaceuticalRadiationDoseSRStorage    1.2.840.10008.5.1.4.1.1.88.68
ColonCADSRStorage                            1.2.840.10008.5.1.4.1.1.88.69
ImplantationPlanSRStorage                    1.2.840.10008.5.1.4.1.1.88.70
AcquisitionContextSRStorage                  1.2.840.10008.5.1.4.1.1.88.71
SimplifiedAdultEchoSRStorage                 1.2.840.10008.5.1.4.1.1.88.72
PatientRadiationDoseSRStorage                1.2.840.10008.5.1.4.1.1.88.73
PlannedImagingAgentAdministrationSRStorage   1.2.840.10008.5.1.4.1.1.88.74
PerformedImagingAgentAdministrationSRStorage 1.2.840.10008.5.1.4.1.1.88.75
WaveformAnnotationSRStorage                  1.2.840.10008.5.1.4.1.1.88.77

RenditionSelectionDocumentRealTimeCommunication 1.2.840.10008.10.4 (*)

(*) これは Storage SOP クラスではなく、リアルタイム通信に用いられます。

ロギング

各種コマンドラインツールおよび基盤ライブラリのロギング出力レベルはユーザーが指定できます。既定ではエラーと警告のみが標準エラー出力に書き出されます。–verbose オプションを使うと、処理の詳細といった情報メッセージも報告されます。–debug オプションは、デバッグ目的など内部動作のより詳しい情報を得るために使えます。その他のロギングレベルは –log-level オプションで選択できます。–quiet モードでは致命的エラーのみが報告されます。そのような非常に重大なエラーが発生した場合、アプリケーションは通常終了します。各ロギングレベルの詳細は、モジュール「oflog」のドキュメントを参照してください。

ロギング出力をファイル(オプションでログファイルのローテーション付き)、syslog(Unix)、またはイベントログ(Windows)へ書き出したい場合は、–log-config オプションを使えます。この設定ファイルでは、特定のメッセージだけを特定の出力ストリームへ振り分けたり、メッセージを生成したモジュールやアプリケーションに基づいてフィルタリングしたりすることもできます。設定ファイルの例は < etcdir>/logger.cfg に用意されています。

コマンドライン

すべてのコマンドラインツールは、引数について次の記法を用います。角括弧は省略可能な値(0〜1個)を囲み、末尾の3つのドットは複数の値が許される(1〜n個)ことを示し、両者の組み合わせは0〜n個の値を意味します。

コマンドラインオプションは、先頭の '+' または '-' 記号によって引数と区別されます。通常、コマンドラインオプションの順序と位置は任意です(つまりどこに現れてもよいです)。ただし、互いに排他的なオプションの場合は、最も右側に現れたものが使われます。この挙動は一般的な Unix シェルの標準的な評価規則に従います。

さらに、ファイル名の前に '@' 記号を付けることで、1つ以上のコマンドファイルを指定できます(例: @command.txt)。このようなコマンド引数は、以降の評価に先立って対応するテキストファイルの内容に置き換えられます(連続する空白は、引用符で囲まれていない限り単一の区切りとして扱われます)。コマンドファイルの中に別のコマンドファイルを含めることはできない点に注意してください。この単純ながら効果的な方法により、よく使うオプションや引数の組み合わせをまとめておけるため、長く分かりにくいコマンドラインを避けられます(例は < datadir>/dumppat.txt に用意されています)。

環境変数

dsrdump ユーティリティは、DCMDICTPATH 環境変数で指定された DICOM データ辞書を読み込もうとします。既定では、すなわち DCMDICTPATH 環境変数が設定されていない場合は、辞書がアプリケーションに組み込まれていない限り(Windows では組み込みが既定)、ファイル < datadir>/dicom.dic が読み込まれます。

通常はこの既定の挙動が望ましく、別のデータ辞書が必要な場合にのみ DCMDICTPATH 環境変数を使うべきです。DCMDICTPATH 環境変数は Unix シェルの PATH 変数と同じ形式で、コロン(":")でエントリを区切ります。Windows システムではセミコロン(";")を区切りに使います。データ辞書のコードは、DCMDICTPATH 環境変数で指定された各ファイルを読み込もうとします。データ辞書を1つも読み込めない場合はエラーとなります。

指定されたコマンドラインオプションによっては、dsrdump ユーティリティは文字セットのマッピングテーブルを読み込もうとします。これは DCMTK が oficonv ライブラリ付きでコンパイルされ(これが既定)、かつマッピングテーブルがライブラリに組み込まれていない(DCMTK が共有ライブラリを使う場合の既定)ときに発生します。

マッピングテーブルのファイルは DCMTK の < datadir> に置かれていることが期待されます。別の場所を指定するには DCMICONVPATH 環境変数を使えます。別の場所を指定した場合、それらのマッピングテーブルは組み込みのテーブルも置き換えます。

関連項目

dcmconv(1)

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