diff --git a/README.md b/README.md index 2602c7a5..cfffb127 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# IGTPrototypingTool +# IGTPrototypingTool ![IGTPT Icon](src/main/resources/icon/icon_small.png "IGTPT Icon") + +![Build Status](https://github.com/NAMI-THU/IGTPrototypingTool/actions/workflows/gradle-build.yml/badge.svg?branch=master) +[![Javadoc](https://img.shields.io/badge/JavaDoc-Online-green)](https://nami-thu.github.io/IGTPrototypingTool/) A tool that provides basic functionalities for IGT. Tracker can be connected using OpenIGTLink, and the reported information can be used for conveniently implementing some functionality. @@ -8,8 +11,6 @@ This tool started as a student project and is currently actively maintained by v Currently, at least **Java 11** is required, but all LTS versions upwards (Java 15, Java 17) and also Java 20 are supported. # Building -![Build Status](https://github.com/NAMI-THU/IGTPrototypingTool/actions/workflows/gradle-build.yml/badge.svg?branch=master) -[![Javadoc](https://img.shields.io/badge/JavaDoc-Online-green)](https://nami-thu.github.io/IGTPrototypingTool/) \ For building, you can import this project as a *Gradle project* into your IDE, or you @@ -43,4 +44,9 @@ _*To ensure compatibility with older Java versions, please set the language leve ## Documentation JavaDoc is automatically compiled and published to [GitHub Pages](https://nami-thu.github.io/IGTPrototypingTool/). -Please make sure to document all public methods and classes to help lowering the barrier for new students. \ No newline at end of file +Please make sure to document all public methods and classes to help lowering the barrier for new students. + +## License +This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. + +The icon is taken from MITK, which is licensed under the BSD 3-Clause License. Check the [respective attribution](src/main/resources/icon/attribution.txt) for more information. \ No newline at end of file diff --git a/build.gradle b/build.gradle index 580b0bf9..a4638585 100644 --- a/build.gradle +++ b/build.gradle @@ -98,4 +98,5 @@ spotbugsMain { launch4j { mainClassName = 'mainMethod.StartClass' + icon = "${projectDir}/src/main/resources/icon/icon.ico" } diff --git a/src/main/java/mainMethod/App.java b/src/main/java/mainMethod/App.java index d725222d..f8a6da94 100644 --- a/src/main/java/mainMethod/App.java +++ b/src/main/java/mainMethod/App.java @@ -4,6 +4,7 @@ import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; +import javafx.scene.image.Image; import javafx.stage.Stage; import util.ControllerCollector; import util.CustomLogger; @@ -36,6 +37,7 @@ public void start(Stage primaryStage) throws IOException { primaryStage.setTitle("IGT Prototyping Tool"); primaryStage.setMinHeight(400); primaryStage.setMinWidth(800); + primaryStage.getIcons().add(new Image("icon/icon.png")); Scene scene = new Scene(root); scene.getStylesheets().add("css/customstyle.css"); primaryStage.setScene(scene); diff --git a/src/main/resources/icon/attribution.txt b/src/main/resources/icon/attribution.txt new file mode 100644 index 00000000..4aaa675b --- /dev/null +++ b/src/main/resources/icon/attribution.txt @@ -0,0 +1,34 @@ +Taken from MITK +https://github.com/MITK/MITK + +MITK is developed under the BSD 3-Clause License. + +BSD 3-Clause License + +Copyright (c) 2003-2021, German Cancer Research Center (DKFZ) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/main/resources/icon/icon.ico b/src/main/resources/icon/icon.ico new file mode 100644 index 00000000..57840b15 Binary files /dev/null and b/src/main/resources/icon/icon.ico differ diff --git a/src/main/resources/icon/icon.png b/src/main/resources/icon/icon.png new file mode 100644 index 00000000..dd8933ac Binary files /dev/null and b/src/main/resources/icon/icon.png differ diff --git a/src/main/resources/icon/icon.svg b/src/main/resources/icon/icon.svg new file mode 100644 index 00000000..20b65f0a --- /dev/null +++ b/src/main/resources/icon/icon.svg @@ -0,0 +1,218 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/main/resources/icon/icon_small.png b/src/main/resources/icon/icon_small.png new file mode 100644 index 00000000..5700a5b3 Binary files /dev/null and b/src/main/resources/icon/icon_small.png differ