]> Creatis software - vip-workflow-creaphase.git/blob - workflow/3wires_CreaPhase.gwendia
integrated 3wires and 1D simulators; renamed existing one in circle
[vip-workflow-creaphase.git] / workflow / 3wires_CreaPhase.gwendia
1 <?xml version="1.0" encoding="UTF-8"?>
2 <workflow name="3wires_CreaPhase" version="0.1">
3
4   <description>Propagation-based phase contrast images generation</description>
5
6   <interface>
7     <source name="results-directory" type="uri">
8       <source-comment>&lt;b&gt;&lt;font color=blue&gt;results-directory&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Directory&lt;/font&gt;&lt;/b&gt;): Directory where the results will be stored.
9       </source-comment>
10     </source>
11     <source name="vers" type="string">
12       <source-comment>&lt;b&gt;&lt;font color=blue&gt;vers&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): are the projections calculated analytically or using the Radon transform? use the strings 'Radon' OR 'Analytical'
13       </source-comment>
14     </source>
15     <source name="oversamp" type="string">
16       <source-comment>&lt;b&gt;&lt;font color=blue&gt;oversamp&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Oversampling of the projections : use 2 or 4
17       </source-comment>
18     </source>
19     <source name="basename" type="string">
20       <source-comment>&lt;b&gt;&lt;font color=blue&gt;basename&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Basename of the result files
21       </source-comment>
22     </source>
23     <source name="dist" type="string">
24       <source-comment>&lt;b&gt;&lt;font color=blue&gt;dist&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;):  Distances of propagation (in m), e.g. 0 0.01 0.1 0.20 0.50
25       </source-comment>
26     </source>
27     <source name="energy" type="string">
28       <source-comment>&lt;b&gt;&lt;font color=blue&gt;energy&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Energy of the incoming X-ray beam (in keV)
29       </source-comment>
30     </source>
31     <source name="pixelSize" type="string">
32       <source-comment>&lt;b&gt;&lt;font color=blue&gt;pixelSize&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Pixel size of the detector (in um)
33       </source-comment>
34     </source>
35     <source name="nbProj" type="string">
36       <source-comment>&lt;b&gt;&lt;font color=blue&gt;nbProj&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Number of projections (e.g., 360)
37       </source-comment>
38     </source>
39     <source name="rangeAngle" type="string">
40       <source-comment>&lt;b&gt;&lt;font color=blue&gt;rangeAngle&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Range of the tomography : 180 or 360 degrees
41       </source-comment>
42     </source>
43     <source name="modelCtf" type="string">
44       <source-comment>&lt;b&gt;&lt;font color=blue&gt;modelCtf&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;):  Which model do you want to use for the propagation? use 1 or 0
45       </source-comment>
46     </source>
47     <source name="modelFresnel" type="string">
48       <source-comment>&lt;b&gt;&lt;font color=blue&gt;modelFresnel&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Which model do you want to use for the propagation? use 1 or 0
49       </source-comment>
50     </source>
51     <source name="height" type="string">
52       <source-comment>&lt;b&gt;&lt;font color=blue&gt;imageSize&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): height of the object. If height == 1, the simulation is computed in 1D. If height &gt;=2 , the simulation turns into 2D.
53       </source-comment>
54     </source>
55     <source name="noiseType" type="string">
56       <source-comment>&lt;b&gt;&lt;font color=blue&gt;noiseType&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Use noise='gaussian' (addition of gaussian noise) or noise='poisson' (generation of Poisson noise).
57       </source-comment>
58     </source>
59     <source name="noiseAmount" type="string">
60       <source-comment>&lt;b&gt;&lt;font color=blue&gt;noiseAmount&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): If 'gaussian' (additive noise), please specify the Peak-to-peak Signe-to-noise ratio (PPSNR, in dB). If 'poisson', please specify a scaling factor ranging in [0:1].
61       </source-comment>
62     </source>
63     <constant name="dirOut" type="string" value="dirOut" cardinality="scalar" />
64     <sink name="resultTarball" type="uri" />
65   </interface>
66
67   <processors>
68     <processor name="append-date" >
69       <in name="dir" type="uri" depth="0" />
70       <out name="result" type="string" depth="0" />
71       <beanshell>/*----------Beginning of Beanshell------------*/
72                         import java.text.DateFormat;
73                         import java.text.SimpleDateFormat;
74                         import java.util.Date;
75
76 DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
77 String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
78 /*------------End of Beanshell------------*/
79       </beanshell>
80     </processor>
81     <processor name="CreaPhase" >
82       <in name="dirOut" type="string" depth="0" />
83       <in name="vers" type="string" depth="0" />
84       <in name="dist" type="string" depth="0" />
85       <in name="pixelSize" type="string" depth="0" />
86       <in name="modelFresnel" type="string" depth="0" />
87       <in name="rangeAngle" type="string" depth="0" />
88       <in name="nbProj" type="string" depth="0" />
89       <in name="oversamp" type="string" depth="0" />
90       <in name="basename" type="string" depth="0" />
91       <in name="modelCtf" type="string" depth="0" />
92       <in name="noiseAmount" type="string" depth="0" />
93       <in name="noiseType" type="string" depth="0" />
94       <in name="results-directory" type="string" depth="0" />
95       <in name="energy" type="string" depth="0" />
96       <in name="height" type="string" depth="0" />
97       <out name="resultTarball" type="uri" depth="0" />
98       <iterationstrategy>
99         <cross>
100           <port name="results-directory" />
101           <port name="vers" />
102           <port name="oversamp" />
103           <port name="basename" />
104           <port name="dist" />
105           <port name="energy" />
106           <port name="pixelSize" />
107           <port name="nbProj" />
108           <port name="rangeAngle" />
109           <port name="modelCtf" />
110           <port name="modelFresnel" />
111           <port name="dirOut" />
112           <port name="noiseType" />
113           <port name="noiseAmount" />
114           <port name="height" />
115         </cross>
116       </iterationstrategy>
117       <gasw descriptor="[GASW_DIR]/3wires_CreaPhase.xml"/>
118     </processor>
119     <processor name="append-brackets" >
120       <in name="inputString" type="string" depth="0" />
121       <out name="out" type="string" depth="0" />
122       <beanshell>/*----------Beginning of Beanshell------------*/
123 //String toAppend="\\\"";
124 out="["+inputString+"]";
125       </beanshell>
126     </processor>
127     <processor name="append-simple-quotes" >
128       <in name="inputString" type="string" depth="0" />
129       <out name="out" type="string" depth="0" />
130       <beanshell>/*----------Beginning of Beanshell------------*/
131 String toAppend="'";
132 out=toAppend+inputString+toAppend;
133       </beanshell>
134     </processor>
135     <processor name="append-simple-quotes_2" >
136       <in name="inputString" type="string" depth="0" />
137       <out name="out" type="string" depth="0" />
138       <beanshell>/*----------Beginning of Beanshell------------*/
139 String toAppend="'";
140 out=toAppend+inputString+toAppend;
141       </beanshell>
142     </processor>
143     <processor name="append-simple-quotes_3" >
144       <in name="inputString" type="string" depth="0" />
145       <out name="out" type="string" depth="0" />
146       <beanshell>/*----------Beginning of Beanshell------------*/
147 String toAppend="'";
148 out=toAppend+inputString+toAppend;
149       </beanshell>
150     </processor>
151     <processor name="append-simple-quotes_4" >
152       <in name="inputString" type="string" depth="0" />
153       <out name="out" type="string" depth="0" />
154       <beanshell>/*----------Beginning of Beanshell------------*/
155 String toAppend="'";
156 out=toAppend+inputString+toAppend;
157       </beanshell>
158     </processor>
159   </processors>
160
161   <links>
162       <link from="results-directory" to="append-date:dir" />
163       <link from="append-date:result" to="CreaPhase:results-directory" />
164       <link from="oversamp" to="CreaPhase:oversamp" />
165       <link from="energy" to="CreaPhase:energy" />
166       <link from="pixelSize" to="CreaPhase:pixelSize" />
167       <link from="nbProj" to="CreaPhase:nbProj" />
168       <link from="rangeAngle" to="CreaPhase:rangeAngle" />
169       <link from="modelCtf" to="CreaPhase:modelCtf" />
170       <link from="modelFresnel" to="CreaPhase:modelFresnel" />
171       <link from="noiseAmount" to="CreaPhase:noiseAmount" />
172       <link from="CreaPhase:resultTarball" to="resultTarball" />
173       <link from="dist" to="append-brackets:inputString" />
174       <link from="append-brackets:out" to="CreaPhase:dist" />
175       <link from="vers" to="append-simple-quotes:inputString" />
176       <link from="append-simple-quotes:out" to="CreaPhase:vers" />
177       <link from="basename" to="append-simple-quotes_2:inputString" />
178       <link from="append-simple-quotes_2:out" to="CreaPhase:basename" />
179       <link from="append-simple-quotes_3:out" to="CreaPhase:dirOut" />
180       <link from="noiseType" to="append-simple-quotes_4:inputString" />
181       <link from="append-simple-quotes_4:out" to="CreaPhase:noiseType" />
182       <link from="dirOut" to="append-simple-quotes_3:inputString" />
183       <link from="height" to="CreaPhase:height" />
184   </links>
185
186 </workflow>