Running pipeline with parameters from an XML?

525 views
Skip to first unread message

Elena Ranguelova

unread,
Jul 25, 2013, 10:53:06 AM7/25/13
to xnat_di...@googlegroups.com
Hello,

I'm fairly new to XNAT, but I have to learn how to run a complicated image processing pipeline in XNAT :-). For that purpose I have created quite simple image processing pipeline of 2 steps (Python executables) and a main Python wrapper script.
(I'm attaching the relevant code and 1 test image).

I have read the related XNAT 1.6 documentation pages and have watched the 2012 video of Mohana's pipeline workshop, but I'm still not clear how to configure a simple pipeline like mine:

README
***********************************************************************************************
This contains components of a simple XNAT test image processing pipeline.

Simple XNAT test Pipeline
==========
* segmentation.py: segments a simple test volume by thresholding
* inspection.py: generates PNG file for visual inspection of the segmentation result

== Pipeline ==

=== Segmentation ===
inputs => image [threshold1 threshold2]
outputs => segmented-image

=== Inspection ===
input => image segmented-image
output => output-image: PNG file with 3 perpendicular cross-section views of the segmentation result overlayed on the input image
*****************************************************************************************************

In short:
  • Inputs:
    • For step 1
      • NIFTI image (for uploading the NIFTI image to my XNAT project I made the Python script pyxnat_interface.py- also attached- which seems to work, but my image is to be seen as reseource in the subject/session only under Actions->Manage files),
      • 2 thresholds (optional)
    • For step 2:
      • a NIFTI image with the segmentation result from step 1
  • Outputs:
    • From step 1:
      • a NIFTI image with the segmentation result
    • From step 2:
      • a PNG file with a snapshot of the result.
The pipeline currently runs by calling the main script with 1 parameter
run_test_pipeline.py -c test_pipeline_config.xml,
where the XML file specifies my input and output parameters.

According to the documentation and the tutorial, I should specify my parameters in a  resource XML file, which XNAT understands. But I was wondering is it not possible to directly use my XML and  specify simply one parameter option "-c" followed by the name of my XML containing all parameters? Also, how can I access the NIFTI's I uploaded as resources for a subject (session)?

I would be very grateful for some advice on that.

Kind regards,
Elena
simple_xnat_test_pipeline.zip

Mohana Ramaratnam

unread,
Jul 25, 2013, 1:22:39 PM7/25/13
to xnat_di...@googlegroups.com
Hi Elena,

There are three types of XMLs that the pipeline engine uses:

a) A Pipeline XML which is essentially a step-by-step call to executables. A "xmlized" version of a shell script

b) A Resource XML - the pipeline engine needs to know which executable to call (its location and name), what to prefix to the call (possibly source some setup script) and how to call the executable (order of input arguments and if the prefix of - or -- is to be used while invoking the executable). 

c) A Parameter XML - Most workflows/pipelines need input parameters. These can be supplied either on command line using the format -parameter NAME=VALUE or all parameters can be included in a paramater XML. 

The pipeline engine hence needs to know:

- which Pipeline XML to use

- where to find the resource XML for an executable

- what are the input parameters. 

This is how you would do: 

PIPELINE_HOME/bin/XnatPipelineLauncher -pipeline PATH_TO_PIPELINE_XML -parameterFile PATH_TO_PARAMETER_FILE and_other_arguments. 


A sample pipeline XML, resource XML and Parameter XML is attached. 

In your scenario, you would create a Pipeline XML with:

Step 1: GET the NIFTI files 

Step 2: Call run_test_pipeline.py -c test_pipeline_config.xml

Step 3: Do something else - possibly upload (PUT) the image files to XNAT. 

So to convert this to a XNAT-Pipeline XML you would:

Task 1: Create a resource XML for run_test_pipeline.py. Lets say you store this python script at /usr/local/python_scripts. The resource XML would then look like:

<?xml version="1.0" encoding="UTF-8"?>
<pip:Resource xmlns:pip="http://nrg.wustl.edu/pipeline">
<pip:name>run_test_pipeline.py</pip:name>
<pip:location>/usr/local/python_scripts</pip:location>
<pip:commandPrefix>python</pip:commandPrefix>
        <pip:type>Executable</pip:type>
<pip:description>Generates SOMETHING HERE</pip:description>
<pip:input>
<pip:argument id="configfilepath">
<pip:description>Path to param file</pip:description>
</pip:argument>
<pip:argument id="host">
<pip:description>XNAT Host</pip:description>
</pip:argument>
<pip:argument id="user">
<pip:description>XNAT User</pip:description>
</pip:argument>
<pip:argument id="passwd" isSensitive="true">
<pip:description>XNAT User password</pip:description>
</pip:argument>
<pip:argument id="pipelineLogFile">
<pip:description>Path to pipeline log file</pip:description>
</pip:argument>
</pip:input>
</pip:Resource>


Regards,
Mohana




--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mohana Ramaratnam

unread,
Jul 25, 2013, 1:37:51 PM7/25/13
to xnat_di...@googlegroups.com

Sorry - clicked send by accident:

So your resource XML would look like:

<?xml version="1.0" encoding="UTF-8"?>
<pip:Resource xmlns:pip="http://nrg.wustl.edu/pipeline">
<pip:name>run_test_pipeline.py</pip:name>
<pip:location>/usr/local/python_scripts</pip:location>
<pip:commandPrefix>python</pip:commandPrefix>
        <pip:type>Executable</pip:type>
<pip:description>Generates SOMETHING HERE</pip:description>
<pip:input>
<pip:argument id="configfilepath">
<pip:name>c</pip:name>
                 <pip:description>Path to param file</pip:description>
</pip:argument>
</pip:input>
</pip:Resource>

Save this file as PIPELINE_HOME/templates/misc/catalog/Elena_test/resources/run_test_pipeline.xml

Now your Parameter XML would look like:


<?xml version="1.0" encoding="UTF-8"?>
<pip:Parameters xmlns:pip="http://nrg.wustl.edu/pipeline">
  <pip:parameter>
    <pip:name>config_file_path</pip:name>
    <pip:values>
      <pip:unique>PATH_TO_CONFIG_FILE</pip:unique>
    </pip:values>
  </pip:parameter>
</pip:Parameters>

Your Pipeline XML would look like:
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Mohana Ramaratnam (Washington University) -->
<Pipeline xmlns="http://nrg.wustl.edu/pipeline" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nrg.wustl.edu/pipeline ..\schema\pipeline.xsd" xmlns:ext="org.nrg.validate.utils.ProvenanceUtils" xmlns:fileUtils="http://www.xnat.org/java/org.nrg.imagingtools.utils.FileUtils">
<name>PIPELINE_XML_FILE_NAME_HERE</name>
<!--Should be  Name of the pipeline XML file -->
<location>build-tools</location>
<!-- Filesystem path to the pipeline XML -->
<description>Pipeline to pre-process BLA</description>
<steps>
<step id="2" description="Call run_test_pipeline">
<resource name="run_test_pipeline" location="Elena_test/resources">
<argument id="configfilepath">
<value>PATH_TO_CONFIG_FILE_HERE</value>
</argument>
</resource>
</step>
</steps>
</Pipeline>

(note I have not created Step 1 here - GET NIFTI files).

You would run PIPELINE_HOME/setup.sh

This would copy PIPELINE_HOME/templates/misc/catalog/Elena_test to PIPELINE_HOME/catalog/

You coudl then invoke PIPELINE_HOME/bin/XnatPipelineLauncher with appropriate parameters. 

Having said all this, it may be a good idea for you to rewrite run_test_pipeline.py to accept image file paths as input /output arguments rather than an XML file - but choice is yours. 

Mohana 
Message has been deleted

Elena Ranguelova

unread,
Jul 30, 2013, 8:51:09 AM7/30/13
to xnat_di...@googlegroups.com
Hello again,

One very important question is:

If some (or all) of my pipeline steps produce/use results (images or text data) of other steps, which I would like to send/later take to/from XNAT would this scenario (single resource XML and simple pipeline XML invoking 1 script only) be possible? Or will I need to describe each executable in a separate resource XML and the pipleine XML should describe all steps in detail together with the XNAT calls? Or it can all this still be done using the single parameter XML I have now?

Kind regards,
Elena
Message has been deleted

Elena Ranguelova

unread,
Jul 31, 2013, 6:44:23 AM7/31/13
to xnat_di...@googlegroups.com
Dear Mohana,

I have followed closely your advice, but finally failed to start the PipelineLauncher , it complains of missing arguments. For completeness I will list all my steps below:

  • The location of all my Python scripts and my configuration file is: /home/elena/BiomarkerBoosting/biomarker_boosting/hippocampus_pipeline/simple_xnat_test_pipeline/bin
  • Made directory in <PIPELINE_HOME>/catalog/simple_xnat_test_pipeline and also a subdirectory /resources. In my instalation <PIPELINE_HOME> is /home/xnat/xnat
  • Created resource XML ( <PIPELINE_HOME>/catalog/simple_xnat_test_pipeline/resources/run_test_pipeline.xml):
<?xml version="1.0" encoding="UTF-8"?>
<pip:Resource xmlns:pip="http://nrg.wustl.edu/pipeline">
    <pip:name>run_test_pipeline.py</pip:name>
    <pip:location>/home/elena/BiomarkerBoosting/biomarker_boosting/hippocampus_pipeline/simple_xnat_test_pipeline/bin</pip:location>

    <pip:commandPrefix>python</pip:commandPrefix>
    <pip:type>Executable</pip:type>
    <pip:description>Executes simple XNAT image processing test pipeline with a master script</pip:description>

    <pip:input>
        <pip:argument id="configfilepath">
            <pip:name>c</pip:name>
            <pip:description>Path to param file</pip:description>
        </pip:argument>
    </pip:input>
</pip:Resource>

  • Create parameters file ( <PIPELINE_HOME>/catalog/simple_xnat_test_pipeline/parameter.xml):
<?xml version="1.0" encoding="UTF-8"?>
<pip:Parameters xmlns:pip="http://nrg.wustl.edu/pipeline">
  <pip:parameter>
    <pip:name>config_file_path</pip:name>
    <pip:values>
      <pip:unique>/home/elena/BiomarkerBoosting/biomarker_boosting/hippocampus_pipeline/simple_xnat_test_pipeline/bin</pip:unique>

    </pip:values>
  </pip:parameter>
</pip:Parameters>

  • Created pipeline descriptor ( <PIPELINE_HOME>/catalog/simple_xnat_test_pipeline/simple_xnat_test_pipeline.xml)
<?xml version="1.0" encoding="UTF-8"?>
<Pipeline xmlns="http://nrg.wustl.edu/pipeline" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nrg.wustl.edu/pipeline ..\schema\pipeline.xsd" xmlns:ext="org.nrg.validate.utils.ProvenanceUtils" xmlns:fileUtils="http://www.xnat.org/java/org.nrg.imagingtools.utils.FileUtils">
    <name>simple_xnat_test_pipeline</name>

    <!--Should be  Name of the pipeline XML file -->
    <location>/home/xnat/xnat/pipeline/catalog/simple_xnat_test_pipeline</location>

    <!-- Filesystem path to the pipeline XML -->
    <description>Pipeline to test simple image processing pipeline</description>
    <steps>
        <step id="1" description="Call run_test_pipeline">
            <resource name="run_test_pipeline" location="simple_xnat_test_pipeline/resources">
                <argument id="configfilepath">
                    <value>/home/elena/BiomarkerBoosting/biomarker_boosting/hippocampus_pipeline/simple_xnat_test_pipeline/bin</value>

                </argument>
            </resource>
        </step>
    </steps>
</Pipeline>   

  • Ran ./setup.sh:
    • Missing required command line arguments
      USAGE: ./setup.sh <admin email id> <SMTP server> <xnat url>
      xnat@elena-VirtualBox:~/xnat/pipeline$ ./setup.sh xnat localhost http://xnatws:8080/xnat
    • ....build:start:

      pipeline:setup:
          [chmod] Skipping fileset for directory /home/xnat/xnat/pipeline/catalog. It is empty.
          [chmod] Skipping fileset for directory /home/xnat/xnat/pipeline/catalog. It is empty.
      BUILD SUCCESSFUL
      Total time: 1 seconds
      Finished at: Wed Jul 31 12:18:47 CEST 2013
  • Ran xnat@elena-VirtualBox:~/xnat/pipeline/bin$ ./XnatPipelineLauncher -pipeline ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/simple_xnat_test_pipeline.xml -patameterFile ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/parameter.xml
    Missing required arguments...
  • Tried again like xnat@elena-VirtualBox:~/xnat/pipeline/bin$ ./XnatPipelineLauncher -pipeline ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/simple_xnat_test_pipeline.xml -patameterFile ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/parameter.xml
    Missing required arguments
    XNATPipelineLauncher 
    Options:
         -log <path to log4j.properties file>
         -pipeline <path to pipeline xml file>
         -config: Properties configuration file
         -parameter: FORMAT: <param name>=<comma separated values>
             eg: -parameter mpr=4,5,6
         -parameterFile: Path to parameters xml
             eg: -parameterFile /data/analysis/Parameters.xml
         -dataType: XNAT Data type for which pipeline has been launched
         -id: XNAT ID which uniquely identifies the dataType
         -label: XNAT Label for the  dataType
         -project: XNAT Project to which this id belongs
         -u: XNAT username
         -pwd: XNAT password
         -host: URL to XNAT based Website
         -aliasHost: URL to XNAT based Alias Website
         -useAlias: Force to use aliasHost and not host
         -startAt: (optional) Step to start pipeline at --
         -catalogPath: Root path relative to which Pipeline XML's are located
         -notify: (optional) Email Ids to which notifications are to be sent
         -supressNotification: (optional) Pipeline completion emails will be supressed
         -help

    Which are the required arguments? All but the optional? I thought -pipline and -paramterFile are enough. And I would really prefer to set up the pipline so it can be started not from the command line, but from the XNAT site.

Are all of the above steps correct?

Kind regards,
Elena

On Thursday, July 25, 2013 7:37:51 PM UTC+2, Mohana wrote:

Elena Ranguelova

unread,
Jul 31, 2013, 6:51:56 AM7/31/13
to xnat_di...@googlegroups.com
I meant that I also tried to run the Pipeline Launcher like:


xnat@elena-VirtualBox:~/xnat/pipeline/bin$ ./XnatPipelineLauncher -pipeline ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/simple_xnat_test_pipeline.xml -patameterFile ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/parameter.xml -u admin -pwd admin -host http://xnatws:8080/xnat/
Param Value Pair u=admin
Param Value Pair pwd=********
Param Value Pair host=http://xnatws:8080/xnat/
Missing required arguments
....

Elena Ranguelova

unread,
Jul 31, 2013, 7:15:50 AM7/31/13
to xnat_di...@googlegroups.com
Dear Mohana,

I have followed closely your advice, but finally failed to start the PipelineLauncher , it complains of missing arguments. For completeness I will list all my steps below:

  • The location of all my Python scripts and my configuration file is: /home/elena/BiomarkerBoosting/biomarker_boosting/hippocampus_pipeline/simple_xnat_test_pipeline/bin
  • Made directory in <PIPELINE_HOME>/catalog/simple_xnat_test_pipeline and also a subdirectory /resources. In my instalation <PIPELINE_HOME> is /home/xnat/xnat
  • Created resource XML ( <PIPELINE_HOME>/catalog/simple_xnat_test_pipeline/resources/run_test_pipeline.xml):
<?xml version="1.0" encoding="UTF-8"?>
<pip:Resource xmlns:pip="http://nrg.wustl.edu/pipeline">
    <pip:name>run_test_pipeline.py</pip:name>
    <pip:location>/home/elena/BiomarkerBoosting/biomarker_boosting/hippocampus_pipeline/simple_xnat_test_pipeline/bin</pip:location>

    <pip:commandPrefix>python</pip:commandPrefix>
    <pip:type>Executable</pip:type>
    <pip:description>Executes simple XNAT image processing test pipeline with a master script</pip:description>

    <pip:input>
        <pip:argument id="configfilepath">
            <pip:name>c</pip:name>
            <pip:description>Path to param file</pip:description>
        </pip:argument>
    </pip:input>
</pip:Resource>
  • Create parameters file ( <PIPELINE_HOME>/catalog/simple_xnat_test_pipeline/parameter.xml):
<?xml version="1.0" encoding="UTF-8"?>
<pip:Parameters xmlns:pip="http://nrg.wustl.edu/pipeline">
  <pip:parameter>
    <pip:name>config_file_path</pip:name>
    <pip:values>
      <pip:unique>/home/elena/BiomarkerBoosting/biomarker_boosting/hippocampus_pipeline/simple_xnat_test_pipeline/bin</pip:unique>

    </pip:values>
  </pip:parameter>
</pip:Parameters>
  • Created pipeline descriptor ( <PIPELINE_HOME>/catalog/simple_xnat_test_pipeline/simple_xnat_test_pipeline.xml)
<?xml version="1.0" encoding="UTF-8"?>
<Pipeline xmlns="http://nrg.wustl.edu/pipeline" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nrg.wustl.edu/pipeline ..\schema\pipeline.xsd" xmlns:ext="org.nrg.validate.utils.ProvenanceUtils" xmlns:fileUtils="http://www.xnat.org/java/org.nrg.imagingtools.utils.FileUtils">
    <name>simple_xnat_test_pipeline</name>

    <!--Should be  Name of the pipeline XML file -->
    <location>/home/xnat/xnat/pipeline/catalog/simple_xnat_test_pipeline</location>

    <!-- Filesystem path to the pipeline XML -->
    <description>Pipeline to test simple image processing pipeline</description>

    <steps>
        <step id="1" description="Call run_test_pipeline">
            <resource name="run_test_pipeline" location="simple_xnat_test_pipeline/resources">
                <argument id="configfilepath">
                    <value>/home/elena/BiomarkerBoosting/biomarker_boosting/hippocampus_pipeline/simple_xnat_test_pipeline/bin</value>

                </argument>
            </resource>
        </step>
    </steps>
</Pipeline>   
  • Ran ./setup.sh:
    • Missing required command line arguments
      USAGE: ./setup.sh <admin email id> <SMTP server> <xnat url>
      xnat@elena-VirtualBox:~/xnat/pipeline$ ./setup.sh xnat localhost http://xnatws:8080/xnat
    • ....build:start:

      pipeline:setup:
          [chmod] Skipping fileset for directory /home/xnat/xnat/pipeline/catalog. It is empty.
          [chmod] Skipping fileset for directory /home/xnat/xnat/pipeline/catalog. It is empty.
      BUILD SUCCESSFUL
      Total time: 1 seconds
      Finished at: Wed Jul 31 12:18:47 CEST 2013
  • Ran xnat@elena-VirtualBox:~/xnat/pipeline/bin$ ./XnatPipelineLauncher -pipeline ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/simple_xnat_test_pipeline.xml -patameterFile ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/parameter.xml
    Missing required arguments...
  • Tried again like
  • xnat@elena-VirtualBox:~/xnat/pipeline/bin$ ./XnatPipelineLauncher -pipeline ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/simple_xnat_test_pipeline.xml -patameterFile ~/xnat/pipeline/catalog/simple_xnat_test_pipeline/parameter.xml -u admin -pwd admin -host http://xnatws:8080/xnat/
    Param Value Pair u=admin
    Param Value Pair pwd=********
    Param Value Pair host=http://xnatws:8080/xnat/
    Missing required arguments
  • .XNATPipelineLauncher 

ale xia

unread,
Aug 25, 2015, 11:55:24 AM8/25/15
to xnat_discussion

Hello!!!

I must
simply load a set of images Dicom and take patient data (name, age, gender) and display it via an executable.
I have created all three files needed to build the pipeline engine. They are attached.
My problem is that I do not know how to display the data of patients.
The executable should basically only make a System.out.println (name, age, gender).
i have seen the workshop pipelineEngine and i have read the chapter of the PipelineEngine Schema several times,but these data do not know where to take them and use them in the executable.
Can you help me?

thank you
Informations.xml
InformationEs.xml

Flavin, John

unread,
Aug 25, 2015, 1:28:01 PM8/25/15
to xnat_di...@googlegroups.com
I'm not sure I understand what you're trying to do. Here is what I do know:
* You have a pipeline, Informations.xml
* That pipeline uses a resource, InformationEs.xml, that calls a java executable InformationEs.java
* name, age, and gender are available as pipeline parameters

Now, the things I can see that I don't know:
* You say you want to "display" the values of the name, age, and gender parameters, but I don't know what you mean by "display". 
* Are you trying to make a step in the pipeline that will write these parameters to a file? If so, that's an easy call to the "echo" resource. 
* Do you want your java file InformationEs.java to do something with these parameters? If that's the case, then you haven't given us enough information to help you because we have no idea what is in that file. You may have tried to attach it but it got stripped (you say there are three attachments, but only two files are attached to your post).

I do see one thing that will help you. You have a syntax error. In your resource descriptor InformationEs.xml, you have several arguments, and those all have id attributes. Then in your pipeline, when you call that resource, the arguments there need to have id attributes that match those in the resource descriptor. You have several that are different. 

The "id" attribute of an argument is just some unique identifier that you make up; it needs to be the same in the descriptor xml and the pipeline xml. The "name" of an argument—which only appears in the resource descriptor—is what will be put into the command-line string that is used to run the executable. So, for example, if I were to write a resource descriptor for the UNIX utility "rm", I would define an argument with name "r", which I could give an id of something like "recursiveFlag". The id can be anything that I find useful or memorable or whatever; the name has to be what you would actually type at a command prompt.

Flavin
CNDA Pipelines Developer
@cndapipelines

For more options, visit https://groups.google.com/d/optout.
<Informations.xml><InformationEs.xml>




The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

ale xia

unread,
Aug 26, 2015, 4:07:38 AM8/26/15
to xnat_di...@googlegroups.com
Thanks for your reply and for corrections.
I have to basically load the set of images of Dicom xnat, take the attributes and place them in a database.
Before doing this I wanted to do something more simple.. upload images to take the attributes of patients and display them on the screen, in a console.
My problem is how to manage these attributes in informationEs.java, as i can work with them.
I have not attached the file InformationEs.java because for the moment there is only a press, I do not know how to handle the attributes in InformationEs.java
This is Informationes .java as i imagine that should be written
{public class InformationEs
  public static void main (String[ ] args)
{
System.out.println (ATTRIBUTES);
}
}


Thank you.

--
You received this message because you are subscribed to a topic in the Google Groups "xnat_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xnat_discussion/ewhjL7upJf4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xnat_discussi...@googlegroups.com.

Flavin, John

unread,
Aug 26, 2015, 10:04:27 AM8/26/15
to xnat_di...@googlegroups.com
It looks to me like all you need, at least for your simple test pipeline, is to know how to write a script/executable/whatever that takes arguments from the command line and does something with them. You seem to be having trouble writing this in java, so is there another language you know better? You can call out to any resource you want from within a pipeline, not just java. When I am writing a script that I intend to be executed from within a pipeline, I usually write in python or bash.

To get your parameters from your pipeline to your resource, you need:
1. A script/executable/whatever that can be executed from the command line and accepts your parameters as arguments
2. A resource descriptor. Think of that as a way to tell the pipeline engine “this is how you can execute my script on the command line”. It needs to know the location of the script, the name, and some details about all the arguments you might want to pass.
3. A step in your pipeline that calls the resource and passes your parameters as arguments to the script.

It looks like you have 2 and 3 mostly done, with the few exceptions that I pointed out before that I think you’ve already fixed. All you need to do is 1. This doesn’t have anything to do with the pipeline engine at all. You just need to know how to write a script. You can do this in any language you want, so long as your machine can run it. (I was thinking of providing some links to guides or tutorials, but since I don’t know your level of skill I don’t know if my links would be insultingly basic or too high-level and confusing.)

Flavin
CNDA Pipelines Developer
@cndapipelines


ale xia

unread,
Aug 26, 2015, 10:25:33 AM8/26/15
to xnat_di...@googlegroups.com
I need to print their own attributes and corresponding values taken from DICOM images.
"java executablename parameters",this is the command, but these parameters are to be those of patients who have uploaded xnat.
Even I
thought at the parameters via command line,
but how do I refer precisely to those of DICOM images(name, age ,gender ecc)?even in the executable? how do i do for manage this attributes in the executable?


Reply all
Reply to author
Forward
0 new messages