Skip Headers
Oracle® Multimedia DICOM Developer's Guide
11g Release 1 (11.1)

Part Number B28416-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

5 ORDDicom Reference

Oracle Multimedia describes the ORDDicom object type, which supports the storage, management, and manipulation of DICOM format medical images and other data. The ORDDicom object is intended as an object that is written only once. To generate a new ORDDicom object by image processing or compression, create a new ORDDicom object, ORDImage object, or BLOB.

The ORDDicom object type is defined in the ordcspec.sql file. After installation, this file is available in the Oracle home directory at:

<ORACLE_HOME>/ord/im/admin (on Linux and UNIX)

<ORACLE_HOME>\ord\im\admin (on Windows)

Oracle Multimedia contains the following information about the ORDDicom object type:

This chapter describes the attributes, constructors, and methods in the ORDDicom object interface. For information about other DICOM application programming interfaces (APIs), see the following chapters:

See Oracle Multimedia DICOM Java API Reference for information about the DICOM Java API.

5.1 ORDDicom Object Example Media Table and Directory Definition

The methods described in this reference chapter show examples based on the MEDICAL_IMAGE_OBJ table, which these examples create in the Product Media (PM) sample schema. Refer to the MEDICAL_IMAGE_OBJ table definition that follows when reading through the examples. See Oracle Database Sample Schemas for information about the sample schemas.

Before using ORDDicom methods, you must load some data into the table. For example, you can use the SQL*Loader utility, a Java client, or the import( ) method. Substitute DICOM files you have for the ones shown in the examples.

Note:

If you manipulate the DICOM content itself (by either directly modifying the BLOB or changing the external source), call the setProperties( ) method to ensure that the object attributes stay synchronized. You must also ensure that the update time is modified. Otherwise, the object attributes will not match the DICOM content.

5.1.1 Directory Definition

The following statements must be issued before executing the examples, where "/mydir/work" is the directory where the user (pm) can find the DICOM files:

CREATE OR REPLACE DIRECTORY DICOMDIR as '/mydir/work';
GRANT READ, WRITE ON DIRECTORY DICOMDIR TO pm;

5.1.2 MEDICAL_IMAGE_OBJ Table Definition

Before loading data into the table, you must create the table and columns where the data is to be stored. The following PL/SQL code segment creates the MEDICAL_IMAGE_OBJ table with five columns.

CONNECT pm/<pm-password>
CREATE TABLE MEDICAL_IMAGE_OBJ
(
 id            integer primary key,
 dicom_src     ordsys.orddicom,
 dicom_dest    ordsys.orddicom,
 image_dest    ordsys.ordimage,
 blob_dest     blob 
);
COMMIT;

where:

  • dicom_src: the source DICOM content in the ORDDicom object.

  • dicom_dest: the destination DICOM content in the ORDDicom object.

  • image_dest: the destination DICOM content in the ORDImage object.

  • blob_dest: the destination DICOM content in the BLOB.


ORDDicom Object Type

Oracle Multimedia creates the ORDDicom object type, which supports the storage, management, and manipulation of DICOM format medical images and other data. The attributes for this object type are defined as follows in the ordcspec.sql file:

-------------------
  -- TYPE ATTRIBUTES
  -------------------
  SOP_INSTANCE_UID     VARCHAR2(128),
  SOP_CLASS_UID        VARCHAR2(64),
  STUDY_INSTANCE_UID   VARCHAR2(64),
  SERIES_INSTANCE_UID  VARCHAR2(64),
  source               ORDDataSource,
  metadata             SYS.XMLType,
  contentLength        INTEGER,
  flag                 INTEGER,
  extension            BLOB,
 

where:


ORDDicom Constructors

The ORDDicom object can be constructed using following constructors in a SQL statement or PL/SQL program:

The ORDDicom object has embedded BLOB attributes. BLOB locators must be initialized before they can be accessed. Thus, newly constructed ORDDicom objects (except when constructed from a temporary BLOB) must be inserted into a table before calling object member methods on these ORDDicom objects. This section describes the ORDDicom constructors.


ORDDicom( ) for BLOBs

Format

ORDDicom(SELF IN OUT NOCOPY ORDDicom, data IN BLOB, setproperties IN INTEGER DEFAULT 0) RETURN SELF AS RESULT

Description

Constructs an ORDDicom object from a BLOB. The data stored in the BLOB is copied into the ORDDicom object when the constructed ORDDicom object is inserted or updated into a table. The metadata conforms to the XML schema defined by the default mapping document.

Parameters

data

Embedded DICOM content stored in a BLOB.

setproperties

Indicator flag that determines whether or not the DICOM attributes are extracted from the embedded DICOM content. If the value is 1, the DICOM attributes are extracted into the metadata attribute of the constructed ORDDicom object, and the attributes of the ORDDicom object are populated. If the value is 0, no DICOM attributes are extracted. The default is 0.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this constructor to create an ORDDicom object when the DICOM content is stored in either a temporary or a persistent BLOB.

Examples

Create an ORDDicom object from a BLOB:

SQL> desc blob_tbl;Name                                    Null?    Type---------------------------- -------- ----------------------------ID                                                     NUMBER(38)DATA                                               BLOB 

 insert into medical_image_obj (id, dicom_src)
    select s.id, ORDDicom(s.data) from blob_tbl s;

ORDDicom( ) for ORDImage

Format

ORDDicom(SELF IN OUT NOCOPY ORDDicom, data IN ORDImage, setproperties IN INTEGER DEFAULT 0) RETURN SELF AS RESULT

Description

Constructs an ORDDicom object from an OrdImage object that has either a local source (BLOB) or a file source (BFILE). If the DICOM content is stored originally in the BLOB of the ORDImage object, the data is copied into the BLOB in the ORDDicom object source attribute when the constructed ORDDicom object is inserted or updated into a table. If the DICOM content is stored originally as a BFILE source of the ORDImage object, the srcType, srcLocation, and srcName parameters from the ORDImage source are copied into the source attribute of the ORDDicom object. The metadata conforms to the XML schema defined by the default mapping document.

Parameters

data

Embedded DICOM content stored in an ORDImage object.

setproperties

Indicator flag that determines whether or not the DICOM attributes are extracted from the embedded DICOM content. If the value is 1, the DICOM attributes are extracted into the metadata attribute of the constructed ORDDicom object, and the attributes of the ORDDicom object are populated. If the value is 0, no DICOM attributes are extracted. The default is 0.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this constructor to create an ORDDicom object when the DICOM content is stored in an OrdImage object. Or, use this constructor for migrating an ORDImage object to an ORDDicom object.

Examples

Create an ORDDicom object from an OrdImage object:

SQL>  desc image_tbl;Name                                      Null?    Type---------------------------- -------- ----------------------------ID                                                 NUMBER(38)IMAGE                                              ORDIMAGE 

 insert into medical_image_obj (id, dicom_src)
    select s.id, ORDDicom(s.image) from image_tbl s;

ORDDicom( ) for other sources

Format

ORDDicom( SELF IN OUT NOCOPY ORDDicom, source_type IN VARCHAR2 DEFAULT 'LOCAL', source_location IN VARCHAR2 DEFAULT NULL, source_name IN VARCHAR2 DEFAULT NULL, setproperties IN INTEGER DEFAULT 0 ) RETURN SELF AS RESULT

Description

Constructs an ORDDicom object from a specific source. By default, the value of the source_type parameter is set to 'LOCAL', which means that the source of the data is stored locally in the database in a BLOB. With the default values, an empty object with a local source is constructed. If the value of the source_type parameter is set to 'FILE', an ORDDicom object is constructed with the source stored as an external FILE. The metadata conforms to the XML schema defined by the default XML mapping document.

Parameters

source_type

The type of the source. Valid values are: 'FILE' or 'LOCAL'.

source_location

The directory location of the source (used for source_type='FILE').

source_name

The file name of the source (used for source_type='FILE').

setproperties

Indicator flag that determines whether or not the DICOM attributes are extracted from the embedded DICOM content. If the value is 1, the DICOM attributes are extracted into the metadata attribute of the constructed ORDDicom object, and the attributes of the ORDDicom object are populated. If the value is 0, no DICOM attributes are extracted. The default is 0.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this constructor to create an ORDDicom object when the DICOM content is stored in the file system. Use the empty constructor when uploading DICOM content from a client, such as a Web browser or a Java application. Or, use the empty constructor as a destination object for methods such as processCopy( ), makeAnonymous( ), and writeMetadata( ).

Examples

Example 1:

Create an ORDDicom object from a file without populating the object attributes:

insert into medical_image_obj (id, dicom_src)
    values (1, ORDDicom('FILE', 'DICOMDIR', 'example.dcm'));

Example 2:

Create an ORDDicom object from a file with the setProperties flag set:

insert into medical_image_obj (id, dicom_src)
    values (2, ORDDicom('FILE', 'DICOMDIR', 'example.dcm', 1));

Example 3:

Create an empty ORDDicom object:

insert into medical_image_obj (id, dicom_src)
    values (3, ORDDicom());

ORDDicom Methods

This section presents reference information on the ORDDicom methods, which are the following:


export( )

Format

export(SELF IN ORDDicom, dest_type IN VARCHAR2, dest_location IN VARCHAR2, dest_name IN VARCHAR2)

Description

Exports embedded DICOM content to a specified destination. The data remains in the source BLOB when it is copied to the destination.

Parameters

dest_type

The type of the destination (only 'FILE' is supported).

dest_location

The location of the destination (must be a valid Oracle directory object).

dest_name

The name of the destination file.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to export the embedded DICOM content to the local file system.

Examples

Export embedded DICOM content to a specified file:

declare
   obj orddicom;
 begin
   select dicom_src into obj from medical_image_obj where id = 1;
   obj.export('FILE', 'DICOMDIR', 'exported.dcm');
 end;
/

extractMetadata( )

Format

extractMetadata ( extractOption IN VARCHAR2 DEFAULT 'ALL', docName IN VARCHAR2 DEFAULT 'ordcmmp.xml') RETURN SYS.XMLTYPE

Description

Returns the DICOM metadata as XML code for a specified mapping document. The default mapping document refers to the default metadata namespace http://xmlns.oracle.com/ord/dicom/metadata_1_0. The metadata attribute of the ORDDicom object is not affected.

Parameters

extractOption

A string that specifies the types of metadata to extract from the DICOM content. Valid values are: 'ALL', 'MAPPED', and 'STANDARD'. The default is 'ALL'.

When the value of this parameter is 'ALL', all the attributes in the embedded DICOM content are extracted. When the value is set to 'MAPPED', only mapped attributes are extracted. And, when the value is set to 'STANDARD', only attributes that conform to the DICOM standard and mapped attributes are extracted.

docName

The name of the mapping document. The default mapping document 'ordcmmp.xml' is loaded during installation. This document refers to the default metadata namespace http://xmlns.oracle.com/ord/dicom/metadata_1_0.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to retrieve metadata from the embedded DICOM content as XML code, and then store it in a database table for searching or viewing.

Examples

Extract metadata from the embedded DICOM content:

declare
   obj orddicom;
   metadata xmltype;
 begin
   select dicom_src into obj from medical_image_obj where id = 1;
 
   -- extract all the metadata using the default mapping document.
   metadata := obj.extractMetadata();
 
   -- extract the standard metadata using the default mapping document.
   metadata := obj.extractMetadata('standard');
 
   -- extract the standard metadata by specifying the mapping document.
   metadata := obj.extractMetadata('standard', 'ordcmmp.xml');
 end;
/

getAttributeByName( )

Format

getAttributeByName (attributeName IN VARCHAR2, definerName IN VARCHAR2 DEFAULT 'DICOM') RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE

Description

Returns the value of a DICOM attribute, in a VARCHAR2 string for DICOM attributes other than SQ type attributes. For SQ type attributes, this method returns a segment of XML code in a VARCHAR2 string. This method is a helper method only.

Parameters

attributeName

The name of a specified attribute or item.

definerName

The name of the attribute definer. The default name is 'DICOM'.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to retrieve any single attribute in the embedded DICOM content. For performance reasons, do not use this method to retrieve more than two or three attributes.

Before calling this method for the first time, call the setProperties( ) method.

This method is not recommended for use in applications that require maximum performance.

Examples

Return the name of a specified DICOM attribute:

declare
   obj orddicom;
   res varchar2(4000);
 begin
   select dicom_src into obj from medical_image_obj where id = 1;
   obj.setProperties;
   
   -- Patient ID attribute, this will return patient ID value
   res := obj.getAttributeByName('Patient ID');
   dbms_output.put_line('Patient ID attribute: ' || res);
 
   -- attribute in SQ type, this will return an xml segment.
   res := obj.getAttributeByName('Source Image Sequence');
   dbms_output.put_line('Source Image Sequence attribute: ' || res);
 end ;
 /

getAttributeByTag( )

Format

getAttributeByTag (tag IN VARCHAR2, definerName IN VARCHAR2 DEFAULT 'DICOM') RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE

Description

Returns the value of a DICOM attribute, in a VARCHAR2 string for DICOM attributes other than SQ type attributes. For SQ type attributes, this method returns a segment of XML code in a VARCHAR2 string. This method is a helper method only.

Parameters

tag

The code value used to specify a DICOM attribute or item tag, as a hexadecimal string. To access child attributes of the sequence type (SQ), use the "." notation. For example: "00082218.00080100" returns the code value (tag "00080100") of anatomic region sequence (tag "00082218"). And "00080005[2]" returns the second item value of the specific character set attribute (tag "00080005").

definerName

The name of the attribute definer. The default name is 'DICOM'.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to retrieve any single attribute in the embedded DICOM content. For performance reasons, do not use this method to retrieve more than two or three attributes.

Before calling this method for the first time, call the setProperties( ) method.

This method is not recommended for use in applications that require maximum performance.

Examples

Return the tag of a specified DICOM attribute:

declare
   obj orddicom;
   res varchar2(4000);
 begin
   select dicom_src into obj from medical_image_obj where id = 1;
   obj.setProperties;
 
   -- Patient ID attribute, this will return patient ID value
   res := obj.getAttributeByTag('00100020');
   dbms_output.put_line('Patient ID attribute: ' || res);
 
   -- attribute in SQ type, this will return an xml segment.
   res := obj.getAttributeByTag('00082112');
   dbms_output.put_line('Source Image Sequence attribute: ' || res);
 end ;
 /

getContent( )

Format

getContent( ) RETURN BLOB DETERMINISTIC

Description

Returns the embedded DICOM content stored in the source attribute of the ORDDicom object. This method returns the BLOB handle, or a null value if the DICOM content has not been imported.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the content of the source attribute for the ORDDicom object:

select t.dicom_src.getContent() from medical_image_obj t;

getContentLength( )

Format

getContentLength( ) RETURN INTEGER DETERMINISTIC PARALLEL_ENABLE

Description

Returns the length of the embedded DICOM content. This method returns the value of the contentLength attribute of the ORDDicom object.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the value of the contentLength attribute for the ORDDicom object:

select t.dicom_src.getContentLength() from medical_image_obj t;

getSeriesInstanceUID( )

Format

getSeriesInstanceUID( ) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE,

Description

Returns the value of the SERIES_INSTANCE_UID attribute of the ORDDicom object.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the value of the SERIES_INSTANCE_UID attribute for the ORDDicom object:

select t.dicom_src.getSeriesInstanceUID() from medical_image_obj t;

getSourceInformation( )

Format

getSourceInformation( ) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE

Description

Returns the source information from the source attribute of the ORDDicom object as a URL in the form "source_type://source_location/source_name".

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the source information for the ORDDicom object:

select t.dicom_src.getSourceInformation() from medical_image_obj t;

getSourceLocation( )

Format

getSourceLocation( ) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE

Description

Returns the source location from the source attribute of the ORDDicom object.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the source location for the ORDDicom object:

select t.dicom_src.getSourceLocation() from medical_image_obj t;

getSourceName( )

Format

getSourceName( ) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE

Description

Returns the source name from the source attribute of the ORDDicom object.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the source name for the ORDDicom object:

select t.dicom_src.getSourceName() from medical_image_obj t;

getSourceType( )

Format

getSourceType( ) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE

Description

Returns the source type from the source attribute of the ORDDicom object.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the source type for the ORDDicom object:

select t.dicom_src.getSourceType() from medical_image_obj t;

getSOPClassUID( )

Format

getSOPClassUID( ) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE,

Description

Returns the value of the SOP_CLASS_UID attribute of the ORDDicom object.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the value of the SOP_CLASS_UID attribute for the ORDDicom object:

select t.dicom_src.getSOPClassUID() from medical_image_obj t;

getSOPInstanceUID( )

Format

getSOPInstanceUID( ) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE

Description

Returns the value of the SOP_INSTANCE_UID attribute of the ORDDicom object.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the value of the SOP_INSTANCE_UID attribute for the ORDDicom object:

select t.dicom_src.getSOPInstanceUID() from medical_image_obj t;

getStudyInstanceUID( )

Format

getStudyInstanceUID( ) RETURN VARCHAR2 DETERMINISTIC PARALLEL_ENABLE,

Description

Returns the value of the STUDY_INSTANCE_UID attribute of the ORDDicom object.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Return the value of the STUDY_INSTANCE_UID attribute for the ORDDicom object:

select t.dicom_src.getStudyInstanceUID() from medical_image_obj t;

import( )

Format

import(SELF IN OUT NOCOPY ORDDicom, setproperties IN INTEGER DEFAULT 1)

Description

Imports DICOM content from the current source. This method assumes that the source attributes have already been set in the ORDDicom object by passing the source_type, source_location, and source_name parameters to the constructor.

Parameters

setproperties

Indicator flag that determines whether or not the DICOM attributes are extracted into the metadata attribute of the ORDDicom object. If the value is 1, the DICOM attributes are extracted into the metadata attribute of the ORDDicom object, and the attributes of the ORDDicom object are populated. If the value is 0, no DICOM attributes are extracted. The default is 1.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method when the ORDDicom object is constructed from a source other than a BLOB, and must be imported into a BLOB.

Examples

Import the DICOM attributes:

declare
   obj orddicom;
 begin
   select dicom_src into obj from medical_image_obj where id = 1 for update;
   if (obj.isLocal() = 0) then
     obj.import();
   end if;
   update medical_image_obj set dicom_src = obj where id = 1;
 end;
/

isAnonymous( )

Format

isAnonymous(anonymityDocName IN VARCHAR2 DEFAULT 'ordcman.xml') RETURN INTEGER

Description

Determines whether or not the embedded DICOM content is anonymous using a specified anonymity document, which is stored in the data model repository. This method returns a value of 1 if the data is anonymous, otherwise it returns a value of 0.

Parameters

anonymityDocName

The name of the anonymity document. The default name is "ordcman.xml".

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method before calling the makeAnonymous( ) method to find out whether or not patient identifying information has been removed from the embedded DICOM content.

Examples

Check if the embedded DICOM content is anonymous:

select t.dicom_src.isAnonymous('ordcman.xml') from medical_image_obj t;

isConformanceValid( )

Format

isConformanceValid( constraintName IN VARCHAR2 ) RETURN INTEGER

Description

Performs a conformance validation check to determine whether or not the embedded DICOM content conforms to a specific set of constraints identified by the constraintName parameter. This method returns a value of 1 if conformance is valid, otherwise it returns a value of 0.

This method also logs error messages from the constraint documents, which can be viewed by querying the public information view orddcm_conformance_vld_msgs. The public information view orddcm_constraint_names contains the list of constraint names.

Parameters

constraintName

The name of the constraint to be used for conformance validation checking.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Check if the ORDDicom object is conformance valid. Then, show any conformance validation messages that are generated.

select t.dicom_src.isConformanceValid('PatientModule')
    from medical_image_obj t;

   select t1.id, t2.message, t2.msg_time time
    from medical_image_obj t1, orddcm_conformance_vld_msgs t2
     where t1.dicom_src.sop_instance_uid = t2.sop_instance_uid and
        t2.rule_name = 'PatientModule';

isLocal( )

Format

isLocal( ) RETURN INTEGER DETERMINISTIC PARALLEL_ENABLE

Description

Returns the local status of the source. If the DICOM content is stored in the source BLOB, the object is defined as local. If the DICOM content is stored externally in an operating system-specific file, the object is defined as not local. This method returns a value of 1 if the object is local, otherwise it returns a value of 0.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

None.

Examples

Check if the DICOM content is local:

select t.dicom_src.isLocal() from medical_image_obj t;
 declare
   obj orddicom;
 begin
   select dicom_src into obj from medical_image_obj where id = 1 for update;
   if (obj.isLocal() = 0) then
     obj.import();
   end if;
   update medical_image_obj set dicom_src = obj where id = 1;
 end;
/

makeAnonymous( )

Format

makeAnonymous (SELF IN ORDDicom, dest_SOP_INSTANCE_UID IN VARCHAR2, dest IN OUT NOCOPY ORDDicom, anonymityDocName IN VARCHAR2 DEFAULT 'ordcman.xml')

Description

Removes patient identifying information from the ORDDicom object after copying it into another ORDDicom object, based on a specified anonymity document. Both the embedded DICOM content and the metadata attribute in the destination ORDDicom object are made anonymous.

Parameters

dest_SOP_INSTANCE_UID

The SOP instance UID of the destination ORDDicom object. It must ensure that the destination DICOM content is globally unique.

dest

An empty ORDDicom object in which to store the anonymous ORDDicom object.

anonymityDocName

The name of the anonymity document. The default name is "ordcman.xml".

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to remove patient identifying information from the embedded DICOM content for use in data sharing and research.

Examples

Remove patient identifying information from the destination ORDDicom object:

declare
   obj_src orddicom;
   obj_dest orddicom;
   dest_sop_instance_uid varchar2(128) := '<unique-UID>';
 begin
   select dicom_src, dicom_dest  into obj_src, obj_dest
   from medical_image_obj where id = 1 for update;
   obj_src.makeAnonymous(dest_sop_instance_uid, obj_dest, 'ordcman.xml');

   update medical_image_obj set dicom_dest = obj_dest where id = 1;
 end;
/

where:


processCopy( ) to BLOBs

Format

processCopy (SELF IN ORDDicom, command IN VARCHAR2, dest IN OUT NOCOPY BLOB)

Description

Copies the ORDDicom image object that is input into the destination BLOB, and then performs the specified processing operations on the destination BLOB. The original ORDDicom object that was input remains unchanged.

Parameters

command

A command string that accepts an image processing operator as input. Valid values include: frame, contentFormat, fileFormat, compressionFormat, cut, scale, and rotate. See the description for the process( ) method in Oracle Multimedia Reference for a complete list of image processing operators and details on each operator.

dest

The destination BLOB that contains the output of the process command on the ORDDicom image.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to process an image into a BLOB after copying it from the ORDDicom object. In this case, the output in the BLOB is a raster image.

In addition, you can use this method to process waveform or video DICOM content. In this case, the output in the BLOB is a video file in AVI format.

See Appendix C for information about the encoding rules that support image content processing.

Examples

Copy the DICOM content into a BLOB and then process it:

declare
   obj orddicom;
   dest blob;
 begin
   select dicom_src, blob_dest into obj, dest 
   from medical_image_obj where id = 1 for update;
 
   obj.processCopy('fileFormat=jpeg maxScale=100 100', dest);
 end;
/

processCopy( ) to ORDDicom

Format

processCopy (SELF IN ORDDicom, command IN VARCHAR2, dest_SOP_INSTANCE_UID IN VARCHAR2, dest IN OUT NOCOPY ORDDicom, metadata IN SYS.XMLTYPE DEFAULT NULL)

Description

Copies the ORDDicom image object that is input into a destination ORDDicom image object, and then performs the specified processing operations on the destination ORDDicom image object. Only the DICOM attributes of the destination ORDDicom image are updated with image information. The original ORDDicom object that was input remains unchanged.

Parameters

command

A command string that accepts an image processing operator as input. Valid values include: compressionFormat, frame, contentFormat, cut, scale, and rotate. See the description for the process( ) method in Oracle Multimedia Reference for a complete list of image processing operators and details on each operator.

dest_SOP_INSTANCE_UID

The SOP instance UID of the destination ORDDicom object. It must ensure that the destination DICOM content is globally unique.

dest

An empty ORDDicom object in which to store the new DICOM image with the new metadata.

metadata

The new metadata to be written into the new DICOM image.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to modify or fix the image data in the current embedded DICOM content.

In addition, you can use this method to create an ORDDicom object with the image content compressed using JPEG or JPEG 2000.

You can also use this method to extract a single frame into an ORDDicom object from a multiframe ORDDicom object.

See Appendix C for information about the encoding rules that support image content processing.

Examples

Copy the ORDDicom object into an ORDDicom image object and then process it:

declare
   obj_src orddicom;
   obj_dest orddicom;
   dest_sop_instance_uid varchar2(128) := '<unique-UID>';
 begin
   select dicom_src, dicom_dest into obj_src, obj_dest
   from medical_image_obj where id = 1 for update;
   obj_src.processcopy('compressionFormat=jpeg',
                       dest_sop_instance_uid,
                       obj_dest);
 
   update medical_image_obj set dicom_dest = obj_dest where id = 1;
 end;
/

where:


processCopy( ) to ORDImage

Format

processCopy (SELF IN ORDDicom, command IN VARCHAR2, dest IN OUT NOCOPY ORDImage)

Description

Copies the ORDDicom image object that is input into the destination ORDImage object, and then performs the specified processing operations on the destination ORDImage object. The original ORDDicom object that was input remains unchanged.

Parameters

command

A command string that accepts an image processing operator as input. Valid values include: frame, contentFormat, fileFormat, compressionFormat, cut, scale, and rotate. See the description for the process( ) method in Oracle Multimedia Reference for a complete list of image processing operators and details on each operator.

dest

An empty ORDImage object in which to store the new, processed ORDImage object without the DICOM metadata.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to get an image that is suitable for presentation on the Web from the embedded DICOM content.

See Appendix C for information about the encoding rules that support image content processing.

Examples

Copy the ORDDicom object into an ORDImage object and then process it:

declare
   obj_src orddicom;
   obj_dest ordimage;
 begin
   select dicom_src, image_dest into obj_src, obj_dest
   from medical_image_obj where id = 1 for update;
   obj_src.processcopy('fileFormat=jpeg maxScale=100 100', obj_dest);
 
   update medical_image_obj set image_dest = obj_dest where id = 1;
 end;
/

setProperties( )

Format

setProperties (SELF IN OUT NOCOPY ORDDicom)

Description

Sets the attributes of the ORDDicom object. The attributes of the ORDDicom object are populated and all the embedded DICOM content attributes are extracted into the metadata attribute of ORDDicom object. The XML metadata conforms to the default metadata schema namespace http://xmlns.oracle.com/ord/dicom/metadata_1_0.

Parameters

None.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to populate ORDDicom object attributes and to get the metadata from the embedded DICOM content.

Examples

Set the attributes of the ORDDicom object:

declare
   obj orddicom;
 begin
   select dicom_src into obj from medical_image_obj where id = 1 for update;
   obj.setProperties();
   update medical_image_obj set dicom_src = obj where id = 1;
 end;
/

writeMetadata( )

Format

writeMetadata (SELF IN ORDDicom, metadata IN SYS.XMLTYPE, dest IN OUT NOCOPY ORDDicom)

Description

Modifies the current ORDDicom object with the metadata provided by making a copy of the existing ORDDicom object in the destination ORDDicom object, and then modifying the metadata. The original ORDDicom object remains unchanged. The attributes in the embedded DICOM content of the destination ORDDicom object are copied from the metadata that was input.

Parameters

metadata

The input metadata stored in data type XMLType. In the destination ORDDicom object, the input metadata is used to update the values for attributes that are identical to attributes in the source ORDDicom object or to add any new attributes. The metadata must conform to the default metadata schema with the namespace http://xmlns.oracle.com/ord/dicom/metadata_1_0. The SOP instance UID in the metadata must ensure that the destination DICOM content is globally unique.

dest

An empty ORDDicom object in which to store the new embedded DICOM content with the new metadata.

Pragmas

None.

Exceptions

None.

Usage Notes

Use this method to update attributes in the embedded DICOM content.

In addition, you can use this method to add private attributes to the embedded DICOM content.

See Appendix C for information about the encoding rules that support metadata extraction.

Examples

Write the new metadata to the copy of the embedded DICOM content:

declare
   obj_src orddicom;
   obj_dest orddicom;
   metadata xmltype;
 begin
   metadata := xmltype(bfilename('DICOMDIR', 'wm_meta.xml'),
                       nls_charset_id('AL32UTF8'),
                       'http://xmlns.oracle.com/ord/dicom/metadata_1_0');
 
   select dicom_src, dicom_dest into obj_src, obj_dest
   from medical_image_obj where id = 1 for update;
 
   obj_src.writeMetadata(metadata, obj_dest);
 
   update medical_image_obj set dicom_dest = obj_dest where id = 1;
 
 end;
/