Customizing the user interface for a pipeline
If you want to have a custom screen to launch a pipeline, a site administrator will have to do the following:
- Create the velocity file for the pipeline in <XNAT_HOME>/projects/<YOUR PROJECT>/src/templates/screens. (ex: PipelineScreen_MyPipeline.vm)
- Create the associated java screen class in <XNAT_HOME>/projects/<YOUR PROJECT>/src/java/org/apache/turbine/app/xnat/modules/screens. (ex: PipelineScreen_MyPipeline.java)
- There is a default interface provided which enables setting up the pipeline for a project. If you want to customize this interface also, then create a screen file called PipelineScreen_MyPipeline_add.vm.
- Update the XNAT instance
- Enter the name of the screen file (PipelineScreen_MyPipeline.vm) in the box labeled "Enter Name of the custom webpage to launch this pipeline."
Creating custom functions
One can write custom extension function and call such functions while running the pipeline. For example, in order to extract some parameters from a dicom file associated with a scan, one could write such a function and invoke it to set a parameter in the pipeline.
Step 1: Create a static method and a jar containing the class. Include the jar in the classpath
Step 2: Assign a name space
Step 3: Invoke the custom function
Customization Questions and Answers
Q: I have an internal and an external IP address for my XNAT site, how do I setup pipelines to work in such a scenario?
- Add -aliashost <DESIRED ADDRESS> to PIPELINE_HOME/bin/XnatPipelineLauncher
Q: How do I run a pipeline on TOMCAT_HOST?
- Apart from setting aliasHost as mentioned above, pass -useAlias while invoking PIPELINE_HOME/bin/XnatPipelineLauncher
Q: Where can I get source code for action, screen and velocity files for a custom pipeline?