1 <?xml version="1.0" encoding="UTF-8"?>
2 <workflow name="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 file
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="muMat" type="string">
52 <source-comment><b><font color=blue>muMat</font></b> (<b><font color=green>String</font></b>): Material of the circle (e.g., PET at 19 keV)
55 <source name="deltaMat" type="string">
56 <source-comment><b><font color=blue>deltaMat</font></b> (<b><font color=green>String</font></b>): Material of the circle (e.g., PET at 19 keV)
59 <source name="Rcircle" type="string">
60 <source-comment><b><font color=blue>Rcircle</font></b> (<b><font color=green>String</font></b>): radius of the circle
63 <source name="imageSize" type="string">
64 <source-comment><b><font color=blue>imageSize</font></b> (<b><font color=green>String</font></b>): Size of the image (square)
67 <source name="circleCenter" type="string">
68 <source-comment><b><font color=blue>circleCenter</font></b> (<b><font color=green>String</font></b>): 2D coordinates of the circle center (e.g., 200 250)
71 <source name="noiseType" type="string">
72 <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) Put '<b>no</b>' to ignore this optional input.
75 <source name="noiseAmount" type="string">
76 <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)
79 <constant name="dirOut" type="string" value="dirOut" cardinality="scalar" />
80 <sink name="resultTarball" type="uri" />
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;
92 DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
93 String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
94 /*------------End of Beanshell------------*/
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" />
120 <port name="results-directory" />
122 <port name="oversamp" />
123 <port name="basename" />
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" />
141 <gasw descriptor="[GASW_DIR]/CreaPhase.xml"/>
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+"]";
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+"]";
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------------*/
164 out=toAppend+inputString+toAppend;
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------------*/
172 out=toAppend+inputString+toAppend;
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------------*/
180 out=toAppend+inputString+toAppend;
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------------*/
188 out=toAppend+inputString+toAppend;
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" />