Create a new DICOM file

31 views
Skip to first unread message

Dim Mal

unread,
Jan 3, 2020, 6:37:35 AM1/3/20
to nanodicom
Hi,

I'm sorry if this question has been already asked but I didn't found it in the group.
I made a software for veterinary clinics and I would like to transfer my informations (patient name, age...) to the medical device.
The goal is to avoid the veterinarian to enter the information twice (once in my software and once on the medical device).
I found this code : 
 // 19) Pass your own list of mappings to anonymizer. Patient Name should be replace to
 
// 'Mapped' if 'Anonymized' is found. Case sensitive
 
try
 
{
 echo
"19) Pass your own list of mappings to anonymizer\n";
 
// Own tag elements for anonymizing
 $tags
= array(
 array
(0x0008, 0x0020, '{date|Ymd}'), // Study Date
 array
(0x0008, 0x0021, '{date|Ymd}'), // Series Date
 array
(0x0008, 0x0090, 'physician{random}'), // Referring Physician
 array
(0x0010, 0x0010, 'patient{consecutive}'),  // Patient Name
 array
(0x0010, 0x0020, 'id{consecutive}'), // Patient ID
 array
(0x0010, 0x0030, '{date|Ymd}'), // Patient Date of Birth
 
);
 $replacements
= array(
 array
(0x0010, 0x0010, 'anonymized', 'Mapped'),
 
);
 $dicom  
= Nanodicom::factory($filename, 'anonymizer');
 $dicom1
= Nanodicom::factory($dicom->anonymize($tags, $replacements), 'dumper', 'blob');
 echo $dicom1
->dump();
 file_put_contents
($filename.'.ex19', $dicom1->write());
 unset
($dicom);
 unset
($dicom1);
 
}
 
catch (Nanodicom_Exception $e)
 
{
 echo
'File failed. '.$e->getMessage()."\n";
 
}

But I really know  nothing about the DICOM. Is there some "Blank file" that we have to modify or should we create it?
I hope my question is clear.
I wish you a happy new year and a lot of success.
Regards,
Dimitri

Nano.

unread,
Jan 7, 2020, 5:13:58 PM1/7/20
to nano...@googlegroups.com
Hi Dimitri,

As mentioned here: https://nanodicom.org/documentation/faq/#q4 it is not documented but doable. Let me see if I can put together something to handle that case.

Cheers,

Nano.


--
You received this message because you are subscribed to the Google Groups "nanodicom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanodicom+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nanodicom/75b5c492-7540-4621-b5d5-a089c73a022f%40googlegroups.com.

Dim Mal

unread,
Jan 9, 2020, 8:33:05 AM1/9/20
to nanodicom
Thank you so much. 
You are my hero ;)
To unsubscribe from this group and stop receiving emails from it, send an email to nano...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages