1 <?xml version="1.0" encoding="UTF-8"?>
2 <workflow name="1D_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="oversamp" type="string">
12 <source-comment><b><font color=blue>oversamp</font></b> (<b><font color=green>Number</font></b>): Oversampling of the projections : use 2 or 4
15 <source name="basename" type="string">
16 <source-comment><b><font color=blue>basename</font></b> (<b><font color=green>String</font></b>): Basename of the result files
19 <source name="dist" type="string">
20 <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
23 <source name="energy" type="string">
24 <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)
27 <source name="pixelSize" type="string">
28 <source-comment><b><font color=blue>pixelSize</font></b> (<b><font color=green>Number</font></b>): Pixel size of the detector (in um)
31 <source name="nbProj" type="string">
32 <source-comment><b><font color=blue>nbProj</font></b> (<b><font color=green>Number</font></b>): Number of projections (e.g., 360)
35 <source name="rangeAngle" type="string">
36 <source-comment><b><font color=blue>rangeAngle</font></b> (<b><font color=green>Number</font></b>): Range of the tomography : 180 or 360 degrees
39 <source name="modelCtf" type="string">
40 <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
43 <source name="modelFresnel" type="string">
44 <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
47 <source name="muMatLfn" type="uri">
48 <source-comment><b><font color=blue>muMat</font></b> (<b><font color=green>String</font></b>): Attenuation map file (in cm^-1)
51 <source name="deltaMatLfn" type="uri">
52 <source-comment><b><font color=blue>deltaMat</font></b> (<b><font color=green>String</font></b>): Refractive index decrement map file (delta)
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="dist" type="string" depth="0" />
84 <in name="pixelSize" type="string" depth="0" />
85 <in name="muMat" type="string" depth="0" />
86 <in name="deltaMat" type="string" depth="0" />
87 <in name="modelFresnel" type="string" depth="0" />
88 <in name="rangeAngle" type="string" depth="0" />
89 <in name="nbProj" type="string" depth="0" />
90 <in name="oversamp" type="string" depth="0" />
91 <in name="basename" type="string" depth="0" />
92 <in name="modelCtf" type="string" depth="0" />
93 <in name="noiseAmount" type="string" depth="0" />
94 <in name="noiseType" type="string" depth="0" />
95 <in name="muLfn" type="uri" depth="0" />
96 <in name="deltaLfn" type="uri" depth="0" />
97 <in name="results-directory" type="string" depth="0" />
98 <in name="energy" type="string" depth="0" />
99 <out name="resultTarball" type="uri" depth="0" />
102 <port name="results-directory" />
103 <port name="oversamp" />
104 <port name="basename" />
106 <port name="energy" />
107 <port name="pixelSize" />
108 <port name="nbProj" />
109 <port name="rangeAngle" />
110 <port name="modelCtf" />
111 <port name="modelFresnel" />
112 <port name="muMat" />
113 <port name="deltaMat" />
114 <port name="dirOut" />
115 <port name="noiseType" />
116 <port name="noiseAmount" />
117 <port name="muLfn" />
118 <port name="deltaLfn" />
121 <gasw descriptor="[GASW_DIR]/1D_CreaPhase.xml"/>
123 <processor name="append-brackets" >
124 <in name="inputString" type="string" depth="0" />
125 <out name="out" type="string" depth="0" />
126 <beanshell>/*----------Beginning of Beanshell------------*/
127 //String toAppend="\\\"";
128 out="["+inputString+"]";
131 <processor name="append-simple-quotes_2" >
132 <in name="inputString" type="string" depth="0" />
133 <out name="out" type="string" depth="0" />
134 <beanshell>/*----------Beginning of Beanshell------------*/
136 out=toAppend+inputString+toAppend;
139 <processor name="append-simple-quotes_3" >
140 <in name="inputString" type="string" depth="0" />
141 <out name="out" type="string" depth="0" />
142 <beanshell>/*----------Beginning of Beanshell------------*/
144 out=toAppend+inputString+toAppend;
147 <processor name="append-simple-quotes_4" >
148 <in name="inputString" type="string" depth="0" />
149 <out name="out" type="string" depth="0" />
150 <beanshell>/*----------Beginning of Beanshell------------*/
152 out=toAppend+inputString+toAppend;
155 <processor name="getFileName_1" >
156 <in name="lfn" type="uri" depth="0" />
157 <out name="fileName" type="string" depth="0" />
158 <beanshell>/*----------Beginning of Beanshell------------*/
159 String[] bits = lfn.toString().split("/");
160 String lastOne = bits[bits.length-1];
162 fileName=toAppend+lastOne+toAppend;
165 <processor name="getFileName_2" >
166 <in name="lfn" type="uri" depth="0" />
167 <out name="fileName" type="string" depth="0" />
168 <beanshell>/*----------Beginning of Beanshell------------*/
169 String[] bits = lfn.toString().split("/");
170 String lastOne = bits[bits.length-1];
172 fileName=toAppend+lastOne+toAppend;
178 <link from="results-directory" to="append-date:dir" />
179 <link from="append-date:result" to="CreaPhase:results-directory" />
180 <link from="oversamp" to="CreaPhase:oversamp" />
181 <link from="energy" to="CreaPhase:energy" />
182 <link from="pixelSize" to="CreaPhase:pixelSize" />
183 <link from="nbProj" to="CreaPhase:nbProj" />
184 <link from="rangeAngle" to="CreaPhase:rangeAngle" />
185 <link from="modelCtf" to="CreaPhase:modelCtf" />
186 <link from="modelFresnel" to="CreaPhase:modelFresnel" />
187 <link from="noiseAmount" to="CreaPhase:noiseAmount" />
188 <link from="CreaPhase:resultTarball" to="resultTarball" />
189 <link from="dist" to="append-brackets:inputString" />
190 <link from="append-brackets:out" to="CreaPhase:dist" />
191 <link from="basename" to="append-simple-quotes_2:inputString" />
192 <link from="append-simple-quotes_2:out" to="CreaPhase:basename" />
193 <link from="append-simple-quotes_3:out" to="CreaPhase:dirOut" />
194 <link from="noiseType" to="append-simple-quotes_4:inputString" />
195 <link from="append-simple-quotes_4:out" to="CreaPhase:noiseType" />
196 <link from="dirOut" to="append-simple-quotes_3:inputString" />
197 <link from="deltaMatLfn" to="CreaPhase:deltaLfn" />
198 <link from="muMatLfn" to="CreaPhase:muLfn" />
199 <link from="deltaMatLfn" to="getFileName_2:lfn" />
200 <link from="getFileName_2:fileName" to="CreaPhase:deltaMat" />
201 <link from="muMatLfn" to="getFileName_1:lfn" />
202 <link from="getFileName_1:fileName" to="CreaPhase:muMat" />