From 33d423f077d32d74a702954ae4e17c20ece4f118 Mon Sep 17 00:00:00 2001 From: Burak USGURLU Date: Wed, 27 Jan 2016 18:16:28 +0200 Subject: [PATCH] labels for tags and labeled values Just a convenient way to get meanings for tags... --- class_dicom.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/class_dicom.php b/class_dicom.php index 5982b38..e3efe09 100644 --- a/class_dicom.php +++ b/class_dicom.php @@ -57,6 +57,8 @@ class dicom_tag { var $tags = array(); + var $labels = array(); + var $labeled = array(); var $file = -1; function __construct($file = '') { @@ -146,6 +148,14 @@ function load_tags() { $this->tags["$ge"] = rtrim($val); } } + + + //labels + $t = preg_match_all("/, [0-9] (.*)/", $line, $matches); + if(isset($matches[1][0])) { + $this->labels[$ge] = $matches[1][0]; + $this->labeled[$matches[1][0]] = $this->tags[$ge]; + } } }