File_DICOM::getValue()

File_DICOM::getValue() -- DICOM 要素の値を取得する

概要

require_once 'File/DICOM.php';

mixed File_DICOM::getValue (mixed $group_or_name [, integer $element = null])

説明

指定したグループの DICOM 要素の値を、パースした DICOM ファイルから取得します。

パラメータ

mixed $group_or_name

DICOM 要素が属するグループ (整数値)、あるいはその名前 (文字列)。

integer $element

DICOM 要素の識別子 (グループ内で一意な値)。オプション。

返り値

成功した場合に DICOM 要素の値、失敗した場合に PEAR_Error を返します。

注意

この関数は、スタティックにコールする ことはできません。

例 43-1getValue() の使用法

require_once('File/DICOM.php');

$dicom_file = new File_DICOM();
$res = $dicom_file->parse('test.dcm');

// エラーチェック
if (PEAR::isError($res)) {
    die($res->getMessage());
}

echo 'this value: '.$dicom_file->getValue('PatientName')."\n";
echo 'Should be the same as this value: '.$dicom_file->getValue(0x0010, 0x0010)."\n";

関連ページ

このページの関連単語:  グループ  オプション