-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from bioinformatics-ua/imp/v2
Sample plugin revamped
- Loading branch information
Showing
16 changed files
with
561 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,77 @@ | ||
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. | ||
|
||
Where should I start? | ||
----------------------- | ||
Getting Started | ||
--------------- | ||
|
||
### Installing and running Dicoogle | ||
|
||
Run Dicoogle | ||
--------------- | ||
1. Go to http://www.dicoogle.com/?page_id=67 | ||
2. Download the version of Dicoogle | ||
3. Run the Dicoogle with: sh Dicoogle.sh or Dicoogle.bat. | ||
4. Is it running? You're ok! | ||
2. Download version 2 (or later) 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 Dicoogle.sh (OSX / Linux) or Dicoogle.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/dicooglePluginSample.git | ||
|
||
2. Go to the project's base directory in a command line and run `mvn install`. Alternatively, open | ||
the Maven project of the plugin with your IDE, then force it to build your project. | ||
|
||
Use your own plugin | ||
-------------------- | ||
3. If the building task is successful, you will have a new jar with dependencies in the target | ||
folder (target/dicoogle-plugin-sample-2.0-jar-with-dependencies.jar). | ||
|
||
You should use Netbeans to compile the project and maven is necessary. Then, the first class to look is RSIPluginSet. It is the place where the magic starts. | ||
### Developing your own plugin based on this sample | ||
|
||
You can compile and run in the command line: | ||
The first class to look into is RSIPluginSet. 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). | ||
|
||
1. https://github.com/bioinformatics-ua/dicooglePluginSample.git | ||
2. cd dicooglePluginSample | ||
3. ```$ mvn install``` | ||
4. copy target/dicooglePluginRestSample-1.0-SNAPSHOT-jar-with-dependencies.jar to the folder Plugins inside Dicoogle project. | ||
5. Run Dicoogle with: sh Dicoogle.sh or Dicoogle.bat. | ||
### Using your plugin | ||
|
||
1. Copy your plugin's package with dependencies (target/dicoogle-plugin-sample-2.0-jar-with-dependencies.jar) | ||
to the "Plugins" folder inside the root folder of Dicoogle. | ||
|
||
2. Run Dicoogle. The plugin will be automatically included. | ||
|
||
Available plugins | ||
----------------------- | ||
- RSIIndex | ||
- RSIStorage | ||
- RSIQuery | ||
- RSIWebService | ||
- RSIJettyPlugin | ||
- Sample HTML5 content and consuming web service: helps to build a web app | ||
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 should go to Services and Enable Dicoogle Web Services. | ||
To test the webservice plugin, you may open your browser and navigate to these URLs: | ||
|
||
- http://127.0.0.1:8080/sample/hello?uid=1111 | ||
- http://127.0.0.1:8080/dashboardSample | ||
- http://127.0.0.1:6060/rsitest (restlet) | ||
- `http://localhost:8080/sample/hello?uid=1111` | ||
- `http://localhost:8080/dashboardSample` | ||
- `http://localhost:8080/ext/rsi-test` (restlet) | ||
|
||
You may also use the built-in Dicoogle services for testing other plugins: | ||
|
||
- GET `http://localhost:8080/search?query=test&provider=RSI` to test the query provider | ||
- POST `http://localhost:8080/management/tasks/index?plugin=RSI&uri=<file:/path/to/DICOM/dir>` to test the indexer | ||
|
||
Platforms | ||
---------------- | ||
---------- | ||
|
||
Dicoogle has been tested in: | ||
|
||
- Windows | ||
- Linux | ||
- Mac OS X | ||
|
||
More information: http://bioinformatics-ua.github.io/dicoogle/ | ||
|
||
|
||
For more information, please visit http://www.dicoogle.com | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ | ||
|
||
This file is part of Dicoogle/${project.name}. | ||
|
||
Dicoogle/${project.name} is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
Dicoogle/${project.name} is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with Dicoogle. If not, see <http://www.gnu.org/licenses/>. |
18 changes: 18 additions & 0 deletions
18
src/main/java/pt/ieeta/dicoogle/plugin/demo/dicooglepluginsample/JsonWebService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 28 additions & 6 deletions
34
src/main/java/pt/ieeta/dicoogle/plugin/demo/dicooglepluginsample/MemoryDICOMDB.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,43 @@ | ||
/** | ||
* Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ | ||
* | ||
* This file is part of Dicoogle/dicoogle-plugin-sample. | ||
* | ||
* Dicoogle/dicoogle-plugin-sample is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Dicoogle/dicoogle-plugin-sample is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Dicoogle. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package pt.ieeta.dicoogle.plugin.demo.dicooglepluginsample; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
/** An in-memory DICOM storage. | ||
* | ||
* @author Luís A. Bastião Silva - <[email protected]> | ||
* @author Luís A. Bastião Silva <[email protected]> | ||
* @author Eduardo Pinho <[email protected]> | ||
*/ | ||
public class MemoryDICOMDB { | ||
|
||
private List<String> patientNames = null; | ||
private List<String> studies = null; | ||
private List<String> series = null; | ||
private List<String> sopInstanceUIDs = null; | ||
private final List<String> patientNames; | ||
private final List<String> studies; | ||
private final List<String> series; | ||
private final List<String> sopInstanceUIDs; | ||
|
||
public MemoryDICOMDB () | ||
{ | ||
patientNames = new ArrayList<>(); | ||
studies = new ArrayList<>(); | ||
series = new ArrayList<>(); | ||
sopInstanceUIDs = new ArrayList<>(); | ||
} | ||
|
||
|
Oops, something went wrong.