mixed File_DICOM::getValue (
mixed $group_or_name
, integer $element = null
)
指定したグループの DICOM 要素の値を、パースした DICOM ファイルから取得します。
$group_or_name
DICOM 要素が属するグループ (整数値)、あるいはその名前 (文字列)。
$element
DICOM 要素の識別子 (グループ内で一意な値)。オプション。
成功した場合に DICOM 要素の値、失敗した場合に PEAR_Error を返します。
This function can not be called statically.
getValue() の使用法
<?php
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";
?>