Imodec (Image [Modern] Codecs) is a set of plugins for the Dicoogle project providing the services of modern image compression codecs.
If you want, you can build from source using the mvn
building tool.
For that, just run:
mvn install
At the root directory of this project.
This plugin set can only be used in Linux. Other OSs are not (yet) supported.
You need to install rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
You also need to install the following codecs to your machine:
sudo apt install webp
cargo install cavif avif-decode
In order to use this plugin, just copy the generated *jar-with-dependencies jar file to the Dicoogle Plugins folder, like the following example:
cp ~/imodec-dicoogle-plugin/target/imodec-dicoogle-plugin-0.0.0-jar-with-dependencies.jar ~/DicoogleDir/Plugins
This is where the modern codec encoding takes place.
You can choose the default format to encode
the images, by adding the following codec
tag to the
xml settings file (path Plugins/settings/imodec-plugin-set.xml
):
<configuration>
...
<codec>jxl</codec>
</configuration>
Possible values are: jxl
, avif
, webp
, keep
and all
for all the previous options simultaneously.
Note: Multi-frame images are not expected to work in the all
setting.
You need to use a specific tool for the store operation. One of the following tools are suggested.
To install:
sudo apt install dcmtk
To use (using the default aetitle and port configurations for the dicoogle PACS):
storescu -aec DICOOGLE-STORAGE localhost 6666 ...FILES
To install the tool:
cargo install dicom-storescu
To use:
dicom-storescu --called-ae-title DICOOGLE-STORAGE localhost:6666 ...FILES
In order to check the stored images, you need to input an url to your browser with the SOP Instance UID of the respective dicom object, following the next example:
http://localhost:8080/imodec/view?siuid=2.25.69906150082773205181031737615574603347&codec=jxl
Base url:
http://localhost:8080/imodec/view
Parameters:
siuid
[Required]: SOP Instance UID of the dicom object's image to be viewed.tsuid
[Optional]: Transfer Syntax UID defining a version of the dicom object in a specific format.codec
[Optional]: If you want to see the image of a specific modern format, choose here which format that you want to see. This is the same as choosing the transfer syntax of that specific codec with the above parameter. If both are used,tsuid
overridescodec
.
The new image formats will encode the pixel data of the dicom objects. The transfer syntaxes define the format of the pixel-data of the dicom objects. Thus, new transfer syntaxes are created to define pixel-data with the bitstream of those modern codecs.
New Transfer-Syntax list:
- JPEG-XL:
1.2.826.0.1.3680043.2.682.104.1
- WebP:
1.2.826.0.1.3680043.2.682.104.2
- AVIF:
1.2.826.0.1.3680043.2.682.104.3
This project encompasses developing a set of plugins for the dicoogle software. Therefore, for anyone interested in contributing, imodec follows the dicoogle development guidelines.
This is a more advanced configuration. You can define encoding options such as quality or speed of compression (depending on the name of the configuration parameters).
An example of those options is displayed below:
<configurations>
...
<jxl distance="1.0" effort="7" />
<avif quality="90" speed="4" />
<webp quality="90" speed="4" />
</configurations>