]> Creatis software - vip-workflow-creaphase.git/blob - workflow/CreaPhase.gwendia
CreaPhase circle workflow v0.1
[vip-workflow-creaphase.git] / workflow / CreaPhase.gwendia
1 <?xml version="1.0" encoding="UTF-8"?>
2 <workflow name="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 file
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="muMat" type="string">
52       <source-comment>&lt;b&gt;&lt;font color=blue&gt;muMat&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Material of the circle (e.g., PET at 19 keV)
53       </source-comment>
54     </source>
55     <source name="deltaMat" type="string">
56       <source-comment>&lt;b&gt;&lt;font color=blue&gt;deltaMat&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Material of the circle (e.g., PET at 19 keV)
57       </source-comment>
58     </source>
59     <source name="Rcircle" type="string">
60       <source-comment>&lt;b&gt;&lt;font color=blue&gt;Rcircle&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): radius of the circle
61       </source-comment>
62     </source>
63     <source name="imageSize" type="string">
64       <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;): Size of the image (square)
65       </source-comment>
66     </source>
67     <source name="circleCenter" type="string">
68       <source-comment>&lt;b&gt;&lt;font color=blue&gt;circleCenter&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): 2D coordinates of the circle center (e.g., 200 250)
69       </source-comment>
70     </source>
71     <source name="noiseType" type="string">
72       <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) Put '&lt;b&gt;no&lt;/b&gt;' to ignore this optional input.
73       </source-comment>
74     </source>
75     <source name="noiseAmount" type="string">
76       <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)
77       </source-comment>
78     </source>
79     <constant name="dirOut" type="string" value="dirOut" cardinality="scalar" />
80     <sink name="resultTarball" type="uri" />
81   </interface>
82
83   <processors>
84     <processor name="append-date" >
85       <in name="dir" type="uri" depth="0" />
86       <out name="result" type="string" depth="0" />
87       <beanshell>/*----------Beginning of Beanshell------------*/
88                         import java.text.DateFormat;
89                         import java.text.SimpleDateFormat;
90                         import java.util.Date;
91
92 DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
93 String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
94 /*------------End of Beanshell------------*/
95       </beanshell>
96     </processor>
97     <processor name="CreaPhase" >
98       <in name="dirOut" type="string" depth="0" />
99       <in name="vers" type="string" depth="0" />
100       <in name="dist" type="string" depth="0" />
101       <in name="Rcircle" type="string" depth="0" />
102       <in name="pixelSize" type="string" depth="0" />
103       <in name="muMat" type="string" depth="0" />
104       <in name="deltaMat" type="string" depth="0" />
105       <in name="modelFresnel" type="string" depth="0" />
106       <in name="rangeAngle" type="string" depth="0" />
107       <in name="nbProj" type="string" depth="0" />
108       <in name="oversamp" type="string" depth="0" />
109       <in name="circleCenter" type="string" depth="0" />
110       <in name="basename" type="string" depth="0" />
111       <in name="modelCtf" type="string" depth="0" />
112       <in name="noiseAmount" type="string" depth="0" />
113       <in name="noiseType" type="string" depth="0" />
114       <in name="imageSize" type="string" depth="0" />
115       <in name="results-directory" type="string" depth="0" />
116       <in name="energy" type="string" depth="0" />
117       <out name="resultTarball" type="uri" depth="0" />
118       <iterationstrategy>
119         <cross>
120           <port name="results-directory" />
121           <port name="vers" />
122           <port name="oversamp" />
123           <port name="basename" />
124           <port name="dist" />
125           <port name="energy" />
126           <port name="pixelSize" />
127           <port name="nbProj" />
128           <port name="rangeAngle" />
129           <port name="modelCtf" />
130           <port name="modelFresnel" />
131           <port name="muMat" />
132           <port name="deltaMat" />
133           <port name="Rcircle" />
134           <port name="imageSize" />
135           <port name="circleCenter" />
136           <port name="dirOut" />
137           <port name="noiseType" />
138           <port name="noiseAmount" />
139         </cross>
140       </iterationstrategy>
141       <gasw descriptor="[GASW_DIR]/CreaPhase.xml"/>
142     </processor>
143     <processor name="append-brackets" >
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="["+inputString+"]";
149       </beanshell>
150     </processor>
151     <processor name="append-brackets_2" >
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="["+inputString+"]";
157       </beanshell>
158     </processor>
159     <processor name="append-simple-quotes" >
160       <in name="inputString" type="string" depth="0" />
161       <out name="out" type="string" depth="0" />
162       <beanshell>/*----------Beginning of Beanshell------------*/
163 String toAppend="'";
164 out=toAppend+inputString+toAppend;
165       </beanshell>
166     </processor>
167     <processor name="append-simple-quotes_2" >
168       <in name="inputString" type="string" depth="0" />
169       <out name="out" type="string" depth="0" />
170       <beanshell>/*----------Beginning of Beanshell------------*/
171 String toAppend="'";
172 out=toAppend+inputString+toAppend;
173       </beanshell>
174     </processor>
175     <processor name="append-simple-quotes_3" >
176       <in name="inputString" type="string" depth="0" />
177       <out name="out" type="string" depth="0" />
178       <beanshell>/*----------Beginning of Beanshell------------*/
179 String toAppend="'";
180 out=toAppend+inputString+toAppend;
181       </beanshell>
182     </processor>
183     <processor name="append-simple-quotes_4" >
184       <in name="inputString" type="string" depth="0" />
185       <out name="out" type="string" depth="0" />
186       <beanshell>/*----------Beginning of Beanshell------------*/
187 String toAppend="'";
188 out=toAppend+inputString+toAppend;
189       </beanshell>
190     </processor>
191   </processors>
192
193   <links>
194       <link from="results-directory" to="append-date:dir" />
195       <link from="append-date:result" to="CreaPhase:results-directory" />
196       <link from="oversamp" to="CreaPhase:oversamp" />
197       <link from="energy" to="CreaPhase:energy" />
198       <link from="pixelSize" to="CreaPhase:pixelSize" />
199       <link from="nbProj" to="CreaPhase:nbProj" />
200       <link from="rangeAngle" to="CreaPhase:rangeAngle" />
201       <link from="modelCtf" to="CreaPhase:modelCtf" />
202       <link from="modelFresnel" to="CreaPhase:modelFresnel" />
203       <link from="muMat" to="CreaPhase:muMat" />
204       <link from="deltaMat" to="CreaPhase:deltaMat" />
205       <link from="Rcircle" to="CreaPhase:Rcircle" />
206       <link from="imageSize" to="CreaPhase:imageSize" />
207       <link from="noiseAmount" to="CreaPhase:noiseAmount" />
208       <link from="CreaPhase:resultTarball" to="resultTarball" />
209       <link from="dist" to="append-brackets:inputString" />
210       <link from="circleCenter" to="append-brackets_2:inputString" />
211       <link from="append-brackets_2:out" to="CreaPhase:circleCenter" />
212       <link from="append-brackets:out" to="CreaPhase:dist" />
213       <link from="vers" to="append-simple-quotes:inputString" />
214       <link from="append-simple-quotes:out" to="CreaPhase:vers" />
215       <link from="basename" to="append-simple-quotes_2:inputString" />
216       <link from="append-simple-quotes_2:out" to="CreaPhase:basename" />
217       <link from="append-simple-quotes_3:out" to="CreaPhase:dirOut" />
218       <link from="noiseType" to="append-simple-quotes_4:inputString" />
219       <link from="append-simple-quotes_4:out" to="CreaPhase:noiseType" />
220       <link from="dirOut" to="append-simple-quotes_3:inputString" />
221   </links>
222
223 </workflow>