Skip to content

Commit

Permalink
Bump to 0.1.0-a1 (#23)
Browse files Browse the repository at this point in the history
* Allow storing pixel-data in native format (#17)

* #14 Feature: Allow for native transfer syntaxes

By default or if specified

* #14 Refactor: organized the enums into a single package

& cherry-picked the readme from main
& changed the 'same' keyword that is to keep the transfer syntax to 'keep'

* #14 Feature: Enable saving all transfer syntaxes at once

By all TS, it is meant all new formats' TSs, as well as the native version (as long the original format is not lossy)

* #14 Feature: Enable viewing any available TS version of a dicom object

 * Using the tsuid or codec parameter - if left unspecified, then use native form
 * TS - Transfer Syntax(es)

* #14 Docs: Updates on the viewer http request parameters

* Fixed readme merge mistake

* Docs: Add table of contents to the readme

* #14 Fix: Adding 'all' to the codec config tag

* Create CODE_OF_CONDUCT.md (#18)

* Update issue templates

* Added contributing section to readme

* Allow defining encoding parameters (#19)

* #15 Feature: quality and speed parameters available

However, still beyond reach of configuration by the user
Also: error handling for subprocesses

* #15 fix: merge mistake

* #15 refactor: inlined encode function into encodePNGFile

Also, encoding options are now set to default

* #15 Feature: Default encoding options are now extracted from yml

From encoding-options.yaml
Also, quality value number type of each encoder is now specified in NewFormat enum
Also, removed unused code

* #15 Feature: Allow defining quality and speed encoding parameters

Configuration is performed at DicoogleDir/Plugins/settings/imodec-plugin-set.xml

* #15 Feature: Warning when encoding parameters are invalid

* Support for storing multi-frame images* (#22)

* #11 Refactor: Paved way to start developing support for multi-frame dicom objects

* #11 Refactor: Memory optimization when codec -> all

Optimization is to use iterator, for each dicom object clone, instead of array - more memory efficient
Also, fixed bug when getting uri (was not getting the correct TS sometimes)
Also, changed some dependencies

* #11 Feature: Store multi-frame images

* #11 Finished feature*: Viewing raw multi-frame images as gif

 * Workaround - Could not find a way yet to display animated images. Thus, server can only view them locally by a file:// link
 * I marked the source of the above problem with a 'fixme 16-09-22' tag

* #11 Finished feature: Multi-frame store operation

* #11 [Bugfix] Some old features that were broken

By the multi-frame support feature

* Code cleanup

* [Refactor] Moves functions pertaining utility to *Utils.java

* #11 [Bugfix] could not read single frame avif

* #11 [README] Informed that `all` does not work with multi-frames storing operation
  • Loading branch information
Almeida-a committed Sep 21, 2022
1 parent e8598a3 commit fb83bf2
Show file tree
Hide file tree
Showing 24 changed files with 1,604 additions and 298 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
e-mail.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
66 changes: 64 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ Imodec (Image [Modern] Codecs) is a set of plugins
for the [Dicoogle](https://github.com/bioinformatics-ua/dicoogle/)
project providing the services of modern image compression codecs.

## Table of contents
1. [Building from source](#building-from-source)
2. [How to use](#how-to-use)
1. [Pre-requisites](#pre-requisites)
2. [Plugging into dicoogle](#plugging-into-dicoogle)
3. [Store-SCU operation](#store-scu-operation)
1. [storescu - dcmtk](#storescu---dcmtk)
2. [dicom-storescu - dicom-rs](#dicom-storescu---dicom-rs)
4. [View the resulting images](#view-the-resulting-images)
1. [Http Request Structure](#http-request-structure)
3. [Other Notes](#other-notes)
1. [New transfer syntaxes](#new-transfer-syntaxes)
2. [Contributing](#contributing)
3. [Configuring encoding options](#configuring-encoding-options)

## Building from source
If you want, you can build from source using the `mvn`
Expand Down Expand Up @@ -57,7 +71,9 @@ xml settings file (path `Plugins/settings/imodec-plugin-set.xml`):
<codec>jxl</codec>
</configuration>
```
Possible values are: `jxl`, `avif` and `webp`.
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.
Expand Down Expand Up @@ -92,6 +108,52 @@ 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 request
http://localhost:8080/imodec/view?siuid=2.25.69906150082773205181031737615574603347&codec=jxl
```
http://localhost:8080/imodec/view?siuid=2.25.69906150082773205181031737615574603347

#### Http request structure
Base url:
```http request
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](#new-transfer-syntaxes) of that specific codec with the
above parameter. If both are used, `tsuid` overrides `codec`.


## Other Notes

### New Transfer Syntaxes

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`

### Contributing
This project encompasses developing a set of plugins for the dicoogle software. Therefore, for anyone interested in contributing, imodec follows the [dicoogle development guidelines](https://github.com/bioinformatics-ua/dicoogle/wiki#development-guidelines).

### Configuring encoding options

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:
```xml
<configurations>
...
<jxl distance="1.0" effort="7" />
<avif quality="90" speed="4" />
<webp quality="90" speed="4" />
</configurations>
```
60 changes: 52 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
<properties>
<project.build.source.encoding>UTF-8</project.build.source.encoding>

<!-- This plugin is directed to the following Dicoogle Version -->
<!-- Dependency version definitions -->
<dicoogle.version>3.1.0</dicoogle.version>

<!-- Jetty server version here -->
<jetty.version>9.4.48.v20220622</jetty.version>

<dcm4che.version>5.23.3</dcm4che.version>
<dcm4che.version>5.27.0</dcm4che.version>
<snakeyaml.version>1.32</snakeyaml.version>
<jaidcm4che.version>1.1</jaidcm4che.version>
</properties>

<dependencies>
Expand All @@ -34,12 +33,57 @@
<artifactId>jetty-rewrite</artifactId>
<version>${jetty.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.dcm4che/dcm4che-core -->
<!-- https://mvnrepository.com/artifact/org.yaml/snakeyaml -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<dependency>
<groupId>jaidcm4che</groupId>
<artifactId>jai_imageio</artifactId>
<version>1.1</version>
<exclusions>
<exclusion>
<groupId>jai_core</groupId>
<artifactId>javax.media</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-core -->
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-core</artifactId>
<version>3.8.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-jpeg -->
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-jpeg</artifactId>
<version>3.8.3</version>
</dependency>
<dependency>
<groupId>com.twelvemonkeys.servlet</groupId>
<artifactId>servlet</artifactId>
<version>3.8.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.dcm4che/dcm4che-imageio -->
<dependency>
<groupId>org.dcm4che</groupId>
<artifactId>dcm4che-core</artifactId>
<version>5.27.0</version>
<artifactId>dcm4che-imageio</artifactId>
<version>${dcm4che.version}</version>
</dependency>
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/com.jiechic.library/Japng &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.jiechic.library</groupId>-->
<!-- <artifactId>Japng</artifactId>-->
<!-- <version>0.5.1</version>-->
<!-- </dependency>-->
</dependencies>

<build>
Expand Down
Loading

0 comments on commit fb83bf2

Please sign in to comment.