File_DICOM

From: Date: Thu, 06 May 2004 07:05:03 +0000
Subject: File_DICOM
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12327@lists.php.net to get a copy of this message
Hi, is anybody using wuth success the package File_DICOM? I'm trying to use the package with a small command line application to manage dicom files but just following the simple doc I can't get any value and always get a "not found" error both retrieving by name and by "code". The same files are correctly read with other dicom header extraction utilities and by dumping the File_DICOM object it looks like there is the binary content of the file in the data structure (but when using the dump method I get an empty file with the exclusion of the package preamble: "...# file generated by PEAR::File_DICOM on 2004-05-04..." ecc. ). This is my test script (practically the same as the doc example): #!/usr/local/bin/php <?php ini_set('include_path', ini_get('include_path').':/usr/local/share/pear'); $file = 'test.dcm'; require_once('File/DICOM.php'); $dicom = new File_DICOM(); $res = $dicom->parse($file); if (PEAR::isError($res)) {
      die("Error: ".$res->getMessage()."\n");
} $result = $dicom->getValue(0x0008, 0x1030); if (PEAR::isError($result)) {
      die("Error: ".$result->getMessage()."\n");
} echo 'Value : '.$dicom->getValue(0x0008, 0x1030)."\n"; ?> This is what I get whatever value I tried to retrieve, whatever file I try to open: $> ./dicomget Error: Element (8,4144) not found $> (and yes the element 8,4144 IS present) Martino Piccinato

« previous php.pear.general (#12327) next »