Created
February 23, 2013 19:41
-
-
Save nanodocumet/5021031 to your computer and use it in GitHub Desktop.
Removing a tag from a DICOM file using Nanodicom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Current way to unset (remove) a tag from a DICOM file. | |
*/ | |
echo "Removing a tag from a DICOM file using Nanodicom"; | |
$filename = "myfile.dcm"; | |
// We need to use dumper | |
$dicom = Nanodicom::factory($filename, 'dumper'); | |
// We need to do dump | |
$dicom->dump(); | |
// We must use this method of using the tag name | |
unset($dicom->patient_name); | |
// Save as new file. PatientName must be gone | |
$dicom->write_file('newFile.dcm'); | |
unset($dicom); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment