1 <?xml version="1.0" encoding="UTF-8"?>
2 <workflow name="3wires_CreaPhase" version="0.1">
4 <description>Propagation-based phase contrast images generation</description>
7 <source name="results-directory" type="uri">
8 <source-comment><b><font color=blue>results-directory</font></b> (<b><font color=green>Directory</font></b>): Directory where the results will be stored.
11 <source name="vers" type="string">
12 <source-comment><b><font color=blue>vers</font></b> (<b><font color=green>String</font></b>): are the projections calculated analytically or using the Radon transform? use the strings 'Radon' OR 'Analytical'
15 <source name="oversamp" type="string">
16 <source-comment><b><font color=blue>oversamp</font></b> (<b><font color=green>Number</font></b>): Oversampling of the projections : use 2 or 4
19 <source name="basename" type="string">
20 <source-comment><b><font color=blue>basename</font></b> (<b><font color=green>String</font></b>): Basename of the result files
23 <source name="dist" type="string">
24 <source-comment><b><font color=blue>dist</font></b> (<b><font color=green>String</font></b>): Distances of propagation (in m), e.g. 0 0.01 0.1 0.20 0.50
27 <source name="energy" type="string">
28 <source-comment><b><font color=blue>energy</font></b> (<b><font color=green>Number</font></b>): Energy of the incoming X-ray beam (in keV)
31 <source name="pixelSize" type="string">
32 <source-comment><b><font color=blue>pixelSize</font></b> (<b><font color=green>Number</font></b>): Pixel size of the detector (in um)
35 <source name="nbProj" type="string">
36 <source-comment><b><font color=blue>nbProj</font></b> (<b><font color=green>Number</font></b>): Number of projections (e.g., 360)
39 <source name="rangeAngle" type="string">
40 <source-comment><b><font color=blue>rangeAngle</font></b> (<b><font color=green>Number</font></b>): Range of the tomography : 180 or 360 degrees
43 <source name="modelCtf" type="string">
44 <source-comment><b><font color=blue>modelCtf</font></b> (<b><font color=green>Number</font></b>): Which model do you want to use for the propagation? use 1 or 0
47 <source name="modelFresnel" type="string">
48 <source-comment><b><font color=blue>modelFresnel</font></b> (<b><font color=green>Number</font></b>): Which model do you want to use for the propagation? use 1 or 0
51 <source name="height" type="string">
52 <source-comment><b><font color=blue>imageSize</font></b> (<b><font color=green>String</font></b>): height of the object. If height == 1, the simulation is computed in 1D. If height >=2 , the simulation turns into 2D.
55 <source name="noiseType" type="string">
56 <source-comment><b><font color=blue>noiseType</font></b> (<b><font color=green>String</font></b>): Use noise='gaussian' (addition of gaussian noise) or noise='poisson' (generation of Poisson noise).
59 <source name="noiseAmount" type="string">
60 <source-comment><b><font color=blue>noiseAmount</font></b> (<b><font color=green>String</font></b>): 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].
63 <constant name="dirOut" type="string" value="dirOut" cardinality="scalar" />
64 <sink name="resultTarball" type="uri" />
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;
76 DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
77 String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
78 /*------------End of Beanshell------------*/
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" />
100 <port name="results-directory" />
102 <port name="oversamp" />
103 <port name="basename" />
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" />
117 <gasw descriptor="[GASW_DIR]/3wires_CreaPhase.xml"/>
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+"]";
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------------*/
132 out=toAppend+inputString+toAppend;
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------------*/
140 out=toAppend+inputString+toAppend;
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------------*/
148 out=toAppend+inputString+toAppend;
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------------*/
156 out=toAppend+inputString+toAppend;
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" />