How Does Oracle Multimedia export images? What code is required in the actual operation process? If you want to know about these problems, you can browse the following articles and hope you will gain some benefits.
Using the Oracle Multimedia export method to export DICOM data in the database requires the database to write data to the file system of the database server. Writing to a file system requires that you grant the write permission to the user PM user on the directory object in which the output DICOM file is written.
Perform the following steps:
1. Create a process to export DICOM data to a file in the IMAGEDIR directory. Execute the following script from the SQL * Plus session:
- @create_export_proc
The create_export_proc. SQL code is as follows:
Java code
- create or replace procedure dicom_export (source_id number, filename varchar2) as
- dcmSrc ordsys.orddicom;
- begin
- select dicom into dcmSrc from medical_image_table where id = source_id;
- dcmSrc.export('FILE', 'IMAGEDIR', filename);
- end;
- /
- show errors;
- create or replace procedure dicom_export (source_id number, filename varchar2) as
- dcmSrc ordsys.orddicom;
- begin
- select dicom into dcmSrc from medical_image_table where id = source_id;
- dcmSrc.export('FILE', 'IMAGEDIR', filename);
- end;
- /
- show errors;
2. Now you can execute the process. Run the following command from the SQL * Plus session:
Java code
- execute dicom_export(1, 'dicom_orig.dcm');
- execute dicom_export(1, 'dicom_orig.dcm');
-
3. Check the created file, open another terminal window, and execute the following command in the IMAGEDIR directory.
Java code
- ls -al dicom_orig.dcm
The above is an introduction to the actual image export procedure in Oracle Multimedia. I hope you will find some gains.