How to configure pre fetch of WADO objects

vrindanayak edited this page Oct 11, 2016 · 11 revisions
Clone this wiki locally

Overview

By enabling this feature, user can configure the pre fetch of WADO objects by a proxy server. Proxy server caches the WADO responses and makes these objects available as and when required by the Viewer.

wado-cache.puml

Use Cases with Configuration

Simple Use Case

This use case specifies how one can enable pre-fetch of WADO objects' JPEG image data only. One needs to configure export rule and exporter as described below :

Export Rule

Add an export rule by creating a LDIF file (e.g.):

     dn: cn=Cache WADO JPEG,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
     objectClass: dcmExportRule
     cn: Cache WADO JPEG
     dcmEntity: Series
     dcmExporterID: WADO-JPEG
     dcmDuration: PT1M

and import it to the LDAP Server by using the ldapmodify command line utility.

One may refer to Export Rule to understand the description of attributes.

Refer ISO-8601 Duration format for more know-how on Durations.

Reasons as to why the pre-fetch of WADO objects' JPEG image data is not done on :

  • STUDY level : When a new Series of the study is received, say after a day (for eg. Structured Reports), then for the whole study the pre-fetch is done again.
  • INSTANCE level : To avoid costly database operations.

Exporter

Add an exporter by creating a LDIF file (e.g.):

        dn: dcmExporterID=WADO-JPEG,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
        objectClass: dcmExporter
        dcmExporterID: WADO-JPEG
        dcmQueueName: Export2
        dcmURI: wado:http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/wado?requestType=WADO&studyUID=[0]&seriesUID=[1]&objectUID=[2]&frameNumber=[3]&contentType=image/jpeg
        dcmProperty: Cache-Control=no-cache
        dicomAETitle: DCM4CHEE
        dicomDescription: Export to WADO

and import it to the LDAP Server by using the ldapmodify command line utility.

One may refer to Exporter Descriptor to understand the description of attributes.

  • Brief Overview & Short Description of dcmURI parameters : To identify a DICOM Object, only one UID is required, because any UID is globally unique. However, the standard requires that the UID of the higher levels in the DICOM Information Model are specified (i.e., series and study), in order to support the use of DICOM devices that support only the baseline hierarchical (rather than extended relational) Query/Retrieve model, which requires the Study Instance UID and Series Instance UID to be defined when retrieving an SOP Instance.

    • studyUID - This parameter is REQUIRED. Should be the Study Instance UID.
    • seriesUID - This parameter is REQUIRED. Should be the Series Instance UID.
    • objectUID - This parameter is REQUIRED. Should be the SOP Instance UID.
    • frameNumber - This parameter is OPTIONAL. Specifies that the single frame with that number within a multi-frame image object shall be returned.
    • contentType - This parameter is OPTIONAL. Its value shall contain one or more media types.
  • The HTTP header fields can be defined in dcmProperty. Cache-Control=no-cache indicates that whenever there is change in study, the cache will be invalidated and WADO data should be reloaded again from archive.

  • One may extend the above defined Exporter to export more than one URL as explained below. Add a new dcmProperty as shown below

    dcmProperty: URL.1=wado:http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/wado?requestType=WADO&studyUID=[0]&seriesUID=[1]&objectUID=[2]&frameNumber=[3]&rows=64&columns=64&contentType=image/jpeg
    

    The two extra URL parameters are briefly described below :

    • rows - This parameter is OPTIONAL. The value shall be expressed as an integer, representing the image height to be returned.
    • columns - This parameter is OPTIONAL. The value shall be expressed as an integer, representing the image width to be returned.

Extended Use Case

This use case specifies how one can enable pre-fetch of WADO objects' metadata as well. One needs to configure export rule and exporter as described below :

Export Rule

Add an export rule by creating a LDIF file (e.g.):

     dn: cn=Cache WADO Metadata,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
     objectClass: dcmExportRule
     cn: Cache WADO Metadata
     dcmEntity: Study
     dcmExporterID: WADO-Metadata
     dcmDuration: PT1M

and import it to the LDAP Server by using the ldapmodify command line utility.

One may refer to Export Rule to understand the description of attributes.

Refer ISO-8601 Duration format for more know-how on Durations.

  • As it makes more sense to export the metadata of all objects of all series of study, the value is set to Study in dcmEntity LDAP attribute.

Exporter

Add an exporter by creating a LDIF file (e.g.):

        dn: dcmExporterID=WADO-Metadata,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
        objectClass: dcmExporter
        dcmExporterID: WADO-Metadata
        dcmQueueName: Export2
        dcmURI: wado:http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs/studies/[0]/metadata
        dcmProperty: Cache-Control=no-cache
        dcmProperty: Accept=application/json
        dicomAETitle: DCM4CHEE
        dicomDescription: Export to WADO

and import it to the LDAP Server by using the ldapmodify command line utility.

One may refer to Exporter Descriptor to understand the description of attributes.

  • The HTTP header fields can be defined in dcmProperty. Cache-Control=no-cache is as explained above in Simple Use Case Exporter section.
  • Accept=application/json indicates that the Accept header is set to application/json because the WADO RESTful service returns the metadata in json format.

Storage

This section is OPTIONAL and briefly explains Configuration of Storage of WADO objects' JPEG image data and/or metadata on a file system. (if required by one's application)

One may add dcmProperty in Exporter (as defined in Simple Use Case and/or Extended Use Case) as shown below :

    dcmProperty: StorageID=wado-jpeg

and / or

    dcmProperty: StorageID=wado-metadata

If the storage ids are set (as shown above) then one must also configure the storage descriptors for these ids as explained in How to configure Storage Directory. Sample configurations for the wado-jpeg and/or wado-metadata storage directories are shown below :

    dn: dcmStorageID=wado-jpeg,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    objectClass: dcmStorage
    dcmStorageID: wado-jpeg
    dcmURI: ${jboss.server.data.url}/wado/
    dcmProperty: pathFormat={0020000D}/{0020000E}/{00080018}/{00081160}.jpeg
    dcmProperty: checkMountFile=NO_MOUNT

and/or

    dn: dcmStorageID=wado-metadata,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    objectClass: dcmStorage
    dcmStorageID: wado-metadata
    dcmURI: ${jboss.server.data.url}/wado/
    dcmProperty: pathFormat={0020000D}.json
    dcmProperty: checkMountFile=NO_MOUNT

One may refer to Storage Descriptor to understand the description of attributes.