Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/dicom-web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
100 changes: 100 additions & 0 deletions plugins/dicom-web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Dicoogle Plugin - Sample
========================

This is a Dicoogle plugin to serve as an example. Those that are interested in developing a new
plugin may use this one as a template.

Getting Started
---------------

### Installing and running Dicoogle

1. Make sure that you have Java installed in your system. Versions 8 and 11 are known to work.
1. Go to https://www.dicoogle.com/downloads and get version 3 of Dicoogle
3. Extract your contents to its own directory (e.g. "~/dicoogle" or "C:\dicoogle", depending on the platform).
4. Run Dicoogle with: sh DicoogleClient.sh (OSX / Linux) or DicoogleClient.bat (Windows).
5. You should see your web browser opening the Dicoogle user interface. Is it running? You're ok!

### Downloading and building the plugin

Maven is required in order to build the project. An IDE with Maven support such as Netbeans may also help.

1. Clone the git repository at https://github.com/bioinformatics-ua/dicoogle-plugin-sample.git

2. Go to the project's base directory in a command line and run `mvn package`.
Alternatively, open the Maven project of the plugin with your IDE, then force it to build your project.

3. If the building task is successful, you will have a new shaded jar (with the necessary dependencies)
in the `target` folder (e.g. `target/dicoogle-plugin-sample-3.1.0.jar`)

### Developing your own plugin based on this sample

The first class to look into is [`RSIPluginSet`][pluginset].
It is the main entry point for everything else.
Once modified to suit your needs, build the plugin again and re-deploy it to Dicoogle (see below).

Be sure to consult the [Dicoogle Learning Pack][learningpack] for more information.

[pluginset]: src/main/java/org/dicoogle/plugins/dicomweb/RSIPluginSet.java
[learningpack]: https://bioinformatics-ua.github.io/dicoogle-learning-pack/docs/developing-plugins/

### Using your plugin

1. Copy your plugin's built jar (`target/dicoogle-plugin-sample-3.1.0.jar`)
to the "Plugins" folder inside the root folder of Dicoogle.

2. Run Dicoogle. The plugin will be automatically included.

Available content
-----------------

- `RSIIndexer` : a sample indexer, only logs the DIM contents of files
- `RSIStorage` : a sample storage service, keeps files in memory buffers
- `RSIQuery` : a sample query provider, returns random data on request
- `RSIJettyPlugin` : a sample plugin for providing web services, holds `RSIWebService`
- `RSIWebService` : a sample web service in the form of a servlet, serves a web page and a few other services
- `RSIRestPlugin` : a sample Restlet server resource, provides dummy data
- Sample HTML5 content and consuming web service: helps you to build a web app

Web service plugin sample and Web App:
--------------------------------------

To test the webservice plugin, you may open your browser and navigate to these URLs:

- `http://localhost:8080/sample/hello?uid=1111`
- `http://localhost:8080/dashboardSample`
- `http://localhost:8080/ext/dicoogle-test` (restlet)

You may also use the built-in Dicoogle services for testing other plugins:

- GET `http://localhost:8080/search?query=test&provider=dicoogle-plugin-sample` to test the query provider
- Note: You will need to record `dicoogle-plugin-sample`
as a DIM provider first. In `confs/server.xml`,
add the query provider in `config/archive/dim-providers`
like this:
```xml
<config>
<!-- ... -->
<archive>
<!-- ... -->
<dim-providers>
<dim-provider>dicoogle-plugin-sample</dim-provider>
</dim-providers>
<!-- ... -->
```
Then restart Dicoogle.
Remember to remove the provider from the list after testing
if you do not want to keep it.
- POST `http://localhost:8080/management/tasks/index?plugin=dicoogle-plugin-sample&uri=<file:/path/to/DICOM/dir>` to test the indexer

Platforms
----------

Dicoogle has been tested in:

- Windows
- Linux
- Mac OS X

For more information, please visit https://www.dicoogle.com

122 changes: 122 additions & 0 deletions plugins/dicom-web/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>dicoogle-plugins</artifactId>
<groupId>pt.ua.ieeta</groupId>
<version>3.4.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.dicoogle.plugins</groupId>
<artifactId>dicomweb</artifactId>
<name>dicomweb</name>
<version>1.0.0-SNAPSHOT</version>
<build>
<resources>
<resource>
<directory>src/main/resources/html5/</directory>
</resource>
<resource>
<targetPath>WebPlugins/webplugin-sample</targetPath>
<directory>src/main/resources/webplugin-sample/dist</directory>
<includes>
<include>package.json</include>
<include>module.js</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>**/*.SF</exclude>
<exclude>**/*.DSA</exclude>
<exclude>**/*.RSA</exclude>
<exclude>**/module-info.class</exclude>
<exclude>**/module-info.java</exclude>
</excludes>
</filter>
</filters>
<minimizeJar>true</minimizeJar>
<relocations>
<relocation>
<pattern>org.dcm4che3</pattern>
<shadedPattern>org.dcm4che5</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>C:\Users\bastiao\Projects\Dicoogle\dicoogle\dicoogle\target\Plugins</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<snapshots />
<id>mavencentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>dicoogle-public</id>
<url>https://dev.bmd-software.com/nexus/content/repositories/dicoogle-public</url>
</repository>
<repository>
<id>maven-restlet</id>
<name>Public online Restlet repository</name>
<url>https://maven.restlet.talend.com</url>
</repository>
<repository>
<snapshots />
<id>dcm4che</id>
<url>https://www.dcm4che.org/maven2/</url>
</repository>
<repository>
<id>sourceforge-releases</id>
<name>Sourceforge Releases</name>
<url>https://oss.sonatype.org/content/repositories/sourceforge-releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>pt.ua.ieeta</groupId>
<artifactId>dicoogle</artifactId>
<version>3.4.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<dicoogle.version>3.4.1</dicoogle.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>9.0.3.v20130506</jetty.version>
<dcm4che.version>5.33.1</dcm4che.version>
</properties>
</project>
Loading