Navigation:  Features >

Compression of Online Studies

Previous pageReturn to chapter overviewNext page

Introduction

The ImageServer can be configured through the rules engine to lossless or lossy compress online studies to conserve disk space.  Rules can be used to specify the type of compression performed and when the compression is performed on a study.

Compression of online studies is treated independently from disk management. Studies are automatically compressed as specified by the rules engine independent of the watermark of the filesystem the study is stored on. Compression rules can also be applied at different times. Compression rules can be applied when a study is initially processed, after a study has been archived, and when a study is restored.  With the release of the 1.5 version, the ImageServer also adds the ability to compress images when the study is initially being processed.

The ImageServer supports automatic decompression of compressed DICOM studies if required for transfer to another DICOM application.  The following topics describe in further detail the ImageServer's compression support.

Supported Compression Transfer Syntaxes

The following table lists the supported transfer syntaxes by the ImageServer. The ImageServer comes with codecs that support RLE compression and standard Lossless and Lossy JPEG compression.  The ImageServer utilizes the Independent JPEG Group library for JPEG compression and contains a managed C# implementation of the RLE codec.

Although not listed, the Enterprise edition of the ImageServer contains plugins for supporting JPEG2000 compression.  These plugins utilize the Accusoft Pegasus JPEG2000 library, and require licensing fees for usage.

DICOM Transfer Syntax

Description

1.2.840.10008.1.2.5

Run Length Encoding (RLE) Compression

1.2.840.10008.1.2.4.57

JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression

1.2.840.10008.1.2.4.51

JPEG Extended (Process 2 & 4): Default Transfer Syntax for Lossy JPEG 12 Bit Image Compression (Process 4 only)

1.2.840.10008.1.2.4.50

JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression

Scheduling of Compression

Although there is a single rule type for compression that can define both lossy or lossless compression, there are separate Service Scheduling queue entries for lossless and lossy compression. A lossless and lossy compression service scheduling queue entry is created for each filesystem. The queue entry schedules itself to periodically check if studies are eligible for compression. The service scheduling queue entry can be disabled if the user desires to disable lossless or lossy compression temporarily or permanently on a filesystem. Note, however, that the Lossy and Lossless compression services only determines which studies are eligible for compression. This study places a record into the WorkQueue to do the actual compression of the studies.

Configuring Compression Rules

Compression rules are configured through the Rules Engine Configuration screen.  Rules are defined for each Server Partition.

Typical Compression Scenerios

The online compression functionality of the ImageServer is primarily used to conserve disk space, and allow more studies to be online at one time. The compression functionality of the ImageServer has been designed to be flexible to support a large number of use cases. In deployments with slow networks, it might be worthwhile to compress studies as soon as they arrive because the reduced bandwidth required for transferring the compressed studies. On other deployments it might make sense to wait to compress studies until after they have been reported because the time to decompress the study on the client is longer than the savings from transmitting the compressed study. The following sections describe several use cases with how the compression functionality can be used.

Temporary Cache Compression Use Case

When being used as a temporary cache, compression rules would typically be set to run when the study is processed. A rule could be defined to lossless compress the study within a few minutes of the study being received. The same rules could also define lossy compression of the study a few months after the study is received. The assumption is that the study would already be reported at the time of lossy compression, and thus the time delay for lossy compression would have to be set for after the typical time it takes to report a study.

The following example rule lossless compresses using JPEG lossless CT, MR, and XA images after the study has been on the ImageServer for 20 minutes. It also lossy compresses the studies after 3 months using JPEG extended compression, and a compression ratio of 6.5:1.

<rule>

  <condition expressionLanguage="dicom">

    <or>

      <equal test="$Modality" refValue="CT" />

      <equal test="$Modality" refValue="MR" />

      <equal test="$Modality" refValue="XA" />

    </or>

  </condition>

  <action>

    <jpeg-lossless time="20" unit="minutes" />

    <jpeg-extended ratio="6.5" time="3" unit="months" />

  </action>

</rule>

Archiving Compressed Studies Scenario

When using the ImageServer as an archive, in some cases it may be desirable to compress studies before the study has been archived, and in other cases it may make sense to compress studies after they have been archived. For instance, most modern tape drives support compression, and if compression in the drive is applied to already compressed studies, the size of the data may actually expand. In this case, it would make sense to delay any compression on a study until after the study has been archived. In this case, a rule would be defined to lossless compress the study, and the Apply Time would be after the study has been archived. Another rule may also be defined to lossy compress the study after an extended period.

If compression was to be done before archival of a study, the archiving delay for studies and the delay before compression would have to be adjusted to ensure this happens. When configuring an archive, a setting exists to set the number of hours delay before archiving. This value must be longer than the delay when compressing studies to ensure that compression happens before archival.

Lossy Compression and Archiving

There are several thoughts on when a study should be lossy compressed in relationship to archival.  A note in the description of the Derivation Description tag in Part 3 of the DICOM standard implies that studies may be lossy compressed for long term archival.  Another thought is that studies should only be lossy compressed after archival, so that more prior studies can be kept online, but the lossless data (on which interpretation may have been done) can always be brought back from the archive.

The ImageServer will allow operation in either mode.  Rules can be created that lossy compress images as soon as they are received or after a delay.   The ImageServer will archive the study in whatever format the study is when the Archive Queue entry is processed.  Note that it is common for Ultrasound multi-frame images to be lossy compressed on the modality and initially received this way by the ImageServer.  In this case it makes sense to always compress the study as lossy.

The apply time for compression rules can also be set for after archival to ensure lossy compression does not happen until after archival.  In this case, the ImageServer contains a number of checks to ensure a study is not rearchived as lossy if it was originally archived as lossless uncompressed or compressed.  For instances, studies are not allowed to be edited if the study was archived as lossless and has since been lossy compressed because the ImageServer rearchives studies after edit.  The ImageServer also will not allow deleting of a series within this type of study, because the deletion of a series also triggers a rearchival of the study.

Compression on Processing Scenario

The ImageServer has the ability to compress studies when they are being processed.  These rules are applied by the rules engine at the SOP Processed time. Since compression occurs right away, the actions for these rules do not define a time for compression.

In this use case, it is guaranteed that studies will be compressed before archival.  It also ensures that studies are compressed whenever they are requested via DICOM from other servers.  The filesystem usage is also lower in this scenario.  When attempting to ensure that studies are compressed quickly, it is recommended that compression happens at processing.

Compression and DICOM Associations

When receiving compressed DICOM studies, the ImageServer stores the images in the compressed transfer syntax they are received in. It is assumed that the transfer syntax is an optimum transfer syntax. For instance, some ultrasound modalities use JPEG Baseline compression at a high compression ratio when producing video clips. These compression ratios are deemed clinically acceptable and are left compressed in this transfer syntax.

When negotiating a DICOM association to send a compressed study to another DICOM application, the ImageServer will propose sending the study in the transfer syntax it is already encoded in. It will also propose an uncompressed transfer syntax for the study. If the compressed transfer syntax is not negotiated, it will automatically decompress the study and send it in the decompressed transfer syntax.

Sample Compression Rules

See the Rules Engine section for a more detailed description of the format of rules.  The following table defines the action types of rules.

Action Type

Description

rle and rle-sop

Run Length Encoding (RLE) Compression

jpeg-lossless and jpeg-lossless-sop

JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression

jpeg-extended and jpeg-extended-sop

JPEG Extended (Process 2 & 4): Default Transfer Syntax for Lossy JPEG 12 Bit Image Compression (Process 4 only)

jpeg-baseline and jpeg-baseline-sop

JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression

The standard compression action types (without "-sop" in the action name) allow setting a time units for how long the ImageServer will delay before the compression occurs. The units are available to use:

minutes
hours
weeks
days
months
years

Note that lossy compression rules require additional compression parameters such as the compression ratio or quality.  See the sample rules below for more details.

The following sections give sample compression rules for each supported compression action type.