Jump to content

nanodocumet

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Everything posted by nanodocumet

  1. Hi Robert, I am the creator of Nanodicom. Please try this code: https://gist.github.com/963030 Posted below as well <?php try { // Load and parse the file $dicom = Nanodicom::factory($filename); $dicom->parse(); $mode = 'LO'; // Do the Query $sql = "SELECT * FROM premier_forms.dicom WHERE RV = '$mode' "; $rs = mysql_query($sql); // Browse result while($row = mysql_fetch_array($rs)) { // Get element and group from column list($element, $group) = sscanf($row['Tag'], "(%X,%X)"); // Print the value echo $row['Attribute_Name'].': '.$dicom->value($element, $group).'<br>'; } // Release memory unset($dicom); } catch (Nanodicom_Exception $e) { // Catach exception echo 'File failed. '.$e->getMessage()."\n"; } A couple of observations: - $dicom->value accepts hex values (or their equivalent in integer), you were passing an string. - you should parse the dicom file only once. Please let me know if that helps. Thanks, Nano.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.