--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<workflow name="odin" version="1.0">
+
+ <description>This application wraps the Odin MRI simulator. The Odin code source is available at http://od1n.sourceforge.net</description>
+
+ <interface>
+ <source name="ProData" type="uri">
+ <source-comment><b><font color="blue">new input</font></b>: Pro file
+ </source-comment>
+ </source>
+ <source name="SmpDir" type="uri">
+ <source-comment><b><font color="blue">new input</font></b>: Folder containing all (and only) Smp files
+ </source-comment>
+ </source>
+ <source name="ResultsDirectory" type="uri">
+ <source-comment><b><font color="blue">new input</font></b>: add description here...
+ </source-comment>
+ </source>
+ <constant name="OdinSeq" type="string" value="odinepiexe" cardinality="scalar" />
+ <source name="options" type="string">
+ <source-comment><b><font color="blue">options</font></b>: any option string, to be appended to the recon-all command line. For instance: '-all'. <b>Important:</b> don't put spaces, use '_' instead. And put 'no' in case you don't want to use any option.
+ </source-comment>
+ </source>
+ </interface>
+
+ <processors>
+ <processor name="odin" >
+ <in name="input4" type="string" depth="0" />
+ <in name="input3" type="string" depth="0" />
+ <in name="input2" type="string" depth="0" />
+ <in name="input1" type="string" depth="0" />
+ <in name="input0" type="uri" depth="0" />
+ <iterationstrategy>
+ <cross>
+ <port name="input0" />
+ <port name="input1" />
+ <port name="input2" />
+ <port name="input3" />
+ <port name="input4" />
+ </cross>
+ </iterationstrategy>
+ <gasw descriptor="[GASW_DIR]/odin.xml"/>
+ </processor>
+ <processor name="append-date" >
+ <in name="dir" type="uri" depth="0" />
+ <out name="result" type="string" depth="0" />
+ <beanshell>/*----------Beginning of Beanshell------------*/
+ import java.text.DateFormat;
+ import java.text.SimpleDateFormat;
+ import java.util.Date;
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
+String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
+/*------------End of Beanshell------------*/
+ </beanshell>
+ </processor>
+ <processor name="listSmpDir" >
+ <in name="inDir" type="uri" depth="0" />
+ <out name="arrayLfn" type="string" depth="1" />
+ <beanshell>
+String smpDir=inDir.toString();
+arrayLfn = new ArrayList();
+String smpLfn="";
+Runtime rt = Runtime.getRuntime();
+try{
+ String [] cmd1 = new String [2];
+ cmd1[0] = "lfc-ls";
+ cmd1[1] = smpDir;
+ Process p1 = rt.exec(cmd1);
+ p1.waitFor();
+
+ String line ="";
+ BufferedReader in = new BufferedReader(new InputStreamReader(p1.getInputStream()));
+ System.out.println(" Listing directory "+smpDir);
+ while(in.ready()){
+ line=in.readLine();
+ try{
+ System.out.println(" Line is "+line);
+ smpLfn=smpDir+"/"+line;
+ arrayLfn.add(""+smpLfn);
+ }catch(Exception e){
+ System.out.println(" exception:"+e.getMessage());
+ }
+
+
+ BufferedReader err = new BufferedReader(new InputStreamReader(p1.getErrorStream()));
+ while(err.ready()){
+ line=err.readLine();
+ System.out.println(" error listing directory "+smpDir+": "+line);
+ }
+ p1.getErrorStream().close();
+ p1.getInputStream().close();
+ p1.getOutputStream().close();
+ }
+ }
+
+ catch(Exception e){
+ System.out.println(" exception:"+e.getMessage());
+ }
+ </beanshell>
+ </processor>
+ </processors>
+
+ <links>
+ <link from="ProData" to="odin:input0" />
+ <link from="ResultsDirectory" to="append-date:dir" />
+ <link from="append-date:result" to="odin:input2" />
+ <link from="OdinSeq" to="odin:input3" />
+ <link from="options" to="odin:input4" />
+ <link from="SmpDir" to="listSmpDir:inDir" />
+ <link from="listSmpDir:arrayLfn" to="odin:input1" />
+ </links>
+
+</workflow>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<workflow name="odin" version="1.0">
+
+ <description>This application wraps the Odin MRI simulator. The Odin code source is available at http://od1n.sourceforge.net</description>
+
+ <interface>
+ <source name="ProData" type="uri">
+ <source-comment><b><font color="blue">new input</font></b>: Pro file
+ </source-comment>
+ </source>
+ <source name="SmpDir" type="uri">
+ <source-comment><b><font color="blue">new input</font></b>: Folder containing all (and only) Smp files
+ </source-comment>
+ </source>
+ <source name="ResultsDirectory" type="uri">
+ <source-comment><b><font color="blue">new input</font></b>: add description here...
+ </source-comment>
+ </source>
+ <constant name="OdinSeq" type="string" value="odinfispexe" cardinality="scalar" />
+ <source name="options" type="string">
+ <source-comment><b><font color="blue">options</font></b>: any option string, to be appended to the recon-all command line. For instance: '-all'. <b>Important:</b> don't put spaces, use '_' instead. And put 'no' in case you don't want to use any option.
+ </source-comment>
+ </source>
+ </interface>
+
+ <processors>
+ <processor name="odin" >
+ <in name="input4" type="string" depth="0" />
+ <in name="input3" type="string" depth="0" />
+ <in name="input2" type="string" depth="0" />
+ <in name="input1" type="string" depth="0" />
+ <in name="input0" type="uri" depth="0" />
+ <iterationstrategy>
+ <cross>
+ <port name="input0" />
+ <port name="input1" />
+ <port name="input2" />
+ <port name="input3" />
+ <port name="input4" />
+ </cross>
+ </iterationstrategy>
+ <gasw descriptor="[GASW_DIR]/odin.xml"/>
+ </processor>
+ <processor name="append-date" >
+ <in name="dir" type="uri" depth="0" />
+ <out name="result" type="string" depth="0" />
+ <beanshell>/*----------Beginning of Beanshell------------*/
+ import java.text.DateFormat;
+ import java.text.SimpleDateFormat;
+ import java.util.Date;
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
+String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
+/*------------End of Beanshell------------*/
+ </beanshell>
+ </processor>
+ <processor name="listSmpDir" >
+ <in name="inDir" type="uri" depth="0" />
+ <out name="arrayLfn" type="string" depth="1" />
+ <beanshell>
+String smpDir=inDir.toString();
+arrayLfn = new ArrayList();
+String smpLfn="";
+Runtime rt = Runtime.getRuntime();
+try{
+ String [] cmd1 = new String [2];
+ cmd1[0] = "lfc-ls";
+ cmd1[1] = smpDir;
+ Process p1 = rt.exec(cmd1);
+ p1.waitFor();
+
+ String line ="";
+ BufferedReader in = new BufferedReader(new InputStreamReader(p1.getInputStream()));
+ System.out.println(" Listing directory "+smpDir);
+ while(in.ready()){
+ line=in.readLine();
+ try{
+ System.out.println(" Line is "+line);
+ smpLfn=smpDir+"/"+line;
+ arrayLfn.add(""+smpLfn);
+ }catch(Exception e){
+ System.out.println(" exception:"+e.getMessage());
+ }
+
+
+ BufferedReader err = new BufferedReader(new InputStreamReader(p1.getErrorStream()));
+ while(err.ready()){
+ line=err.readLine();
+ System.out.println(" error listing directory "+smpDir+": "+line);
+ }
+ p1.getErrorStream().close();
+ p1.getInputStream().close();
+ p1.getOutputStream().close();
+ }
+ }
+
+ catch(Exception e){
+ System.out.println(" exception:"+e.getMessage());
+ }
+ </beanshell>
+ </processor>
+ </processors>
+
+ <links>
+ <link from="ProData" to="odin:input0" />
+ <link from="ResultsDirectory" to="append-date:dir" />
+ <link from="append-date:result" to="odin:input2" />
+ <link from="OdinSeq" to="odin:input3" />
+ <link from="options" to="odin:input4" />
+ <link from="SmpDir" to="listSmpDir:inDir" />
+ <link from="listSmpDir:arrayLfn" to="odin:input1" />
+ </links>
+
+</workflow>