Coder Social home page Coder Social logo

nirspluginxnat's Introduction

XNAT Plugin Development

Objective: Develop a plugin for XNAT to create a new data type and integrate it into the XNAT system using Gradle.

Steps: (skip to Step 5 if edit exsiting plugins)

  1. Setting Up Environment: • Install necessary tools: Java Development Kit (JDK), Gradle, XNAT. (Tips: check Compatibility between JDK and Gradle. For example, JDK 15&Gradle 6.7 can work) • Set the path variable to JDK bin in environment variables • Ensure XNAT is running and accessible.
  2. Create Gradle Project: • Create a new directory for the project. • Iinitialise Gradle project using ‘gradle init‘’. • Choose appropriate options (e.g., Java application, Groovy language). • Navigate to the project directory.
  3. Add XNAT Dependencies: • Add XNAT dependencies to build.gradle:
  4. Develop Plugin: • Create necessary Java/Groovy classes for the plugin. • Create your schema file at /src/main/resources/schemas/schema/schema.xsd , replacing 'schema' with whatever you want to name your schema (for example, /src/main/resources/schemas/NIRS/NIRS.xsd • Configuring XNAT Data Models: edit .java file at src\main\java\org\nrg\xnatx\plugins\data type name
    According to: https://wiki.xnat.org/documentation/xnat-plugin-configurations • Customized XNAT screens .vm files at src\main\resources\META-INF\resources\templates\screens According to: https://wiki.xnat.org/documentation/xnat-data-type-development
  5. Build and Package Plugin: • Run ‘./gradlew build’ to compile the plugin. • Verify that the build is successful. • Package the plugin into a JAR file using Gradle: ‘.\gradlew jar’. Tips: everytime you make any change to schema or java class, use ‘.\gradlew jar’ to generate an updated JAR file. • The JAR file will be located at ./build/libs/
  6. Deploy Plugin to XNAT: • Copy the generated JAR file to the XNAT plugins directory. • Restart XNAT instance to load the new plugin. • Verify that the plugin is successfully loaded in the XNAT admin interface.
  7. Test Plugin: • Create test data to test the functionality of the new data type. • Verify that the plugin behaves as expected. • Debug and fix any issues encountered during testing.

nirspluginxnat's People

Contributors

junmark avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.