-
Notifications
You must be signed in to change notification settings - Fork 0
/
module-xml.html
467 lines (428 loc) · 44.4 KB
/
module-xml.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>2.2 Module XML | BisQue_Documentation.utf8.md</title>
<meta name="description" content="Bisque (Bio-Image Semantic Query User Environment) : Store, visualize, organize and analyze images in the cloud." />
<meta name="generator" content="bookdown 0.13 and GitBook 2.6.7" />
<meta property="og:title" content="2.2 Module XML | BisQue_Documentation.utf8.md" />
<meta property="og:type" content="book" />
<meta property="og:description" content="Bisque (Bio-Image Semantic Query User Environment) : Store, visualize, organize and analyze images in the cloud." />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="2.2 Module XML | BisQue_Documentation.utf8.md" />
<meta name="twitter:description" content="Bisque (Bio-Image Semantic Query User Environment) : Store, visualize, organize and analyze images in the cloud." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="prev" href="dockerfile.html"/>
<link rel="next" href="python-script-wrapper.html"/>
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<style type="text/css">
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
{ content: attr(title);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">Official UCSB BisQue Documentation</a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Getting Started</a><ul>
<li class="chapter" data-level="" data-path="bisque-docker-installation.html"><a href="bisque-docker-installation.html"><i class="fa fa-check"></i>BisQue Docker Installation</a></li>
</ul></li>
<li class="chapter" data-level="1" data-path="intro.html"><a href="intro.html"><i class="fa fa-check"></i><b>1</b> BisQue Cloud Instance</a><ul>
<li class="chapter" data-level="" data-path="how-to-login-or-create-a-new-user.html"><a href="how-to-login-or-create-a-new-user.html"><i class="fa fa-check"></i>How to Login or Create a New User</a></li>
<li class="chapter" data-level="" data-path="how-to-upload-data.html"><a href="how-to-upload-data.html"><i class="fa fa-check"></i>How to Upload Data</a><ul>
<li class="chapter" data-level="" data-path="how-to-upload-data.html"><a href="how-to-upload-data.html#step-1.-login"><i class="fa fa-check"></i>Step 1. Login</a></li>
<li class="chapter" data-level="" data-path="how-to-upload-data.html"><a href="how-to-upload-data.html#step-2.-upload-file-or-folder"><i class="fa fa-check"></i>Step 2. Upload File or Folder</a></li>
<li class="chapter" data-level="" data-path="how-to-upload-data.html"><a href="how-to-upload-data.html#step-3.-build-a-dataset"><i class="fa fa-check"></i>Step 3. Build a Dataset</a></li>
<li class="chapter" data-level="" data-path="how-to-upload-data.html"><a href="how-to-upload-data.html#step-4.-setting-permissions"><i class="fa fa-check"></i>Step 4. Setting Permissions</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="2" data-path="module-development.html"><a href="module-development.html"><i class="fa fa-check"></i><b>2</b> Module Development</a><ul>
<li class="chapter" data-level="2.1" data-path="dockerfile.html"><a href="dockerfile.html"><i class="fa fa-check"></i><b>2.1</b> Dockerfile</a></li>
<li class="chapter" data-level="2.2" data-path="module-xml.html"><a href="module-xml.html"><i class="fa fa-check"></i><b>2.2</b> Module XML</a><ul>
<li class="chapter" data-level="" data-path="module-xml.html"><a href="module-xml.html#module-description"><i class="fa fa-check"></i>Module Description</a></li>
<li class="chapter" data-level="" data-path="module-xml.html"><a href="module-xml.html#configurations-for-images-datasets-and-resources"><i class="fa fa-check"></i>Configurations for Images, Datasets, and Resources</a></li>
<li class="chapter" data-level="" data-path="module-xml.html"><a href="module-xml.html#data-parallel-execution"><i class="fa fa-check"></i>Data-Parallel Execution</a></li>
</ul></li>
<li class="chapter" data-level="2.3" data-path="python-script-wrapper.html"><a href="python-script-wrapper.html"><i class="fa fa-check"></i><b>2.3</b> Python Script Wrapper</a><ul>
<li><a href="python-script-wrapper.html#example.-python-script-wrapper"><em>Example.</em> Python Script Wrapper</a></li>
</ul></li>
<li class="chapter" data-level="2.4" data-path="source-code.html"><a href="source-code.html"><i class="fa fa-check"></i><b>2.4</b> Source Code</a><ul>
<li><a href="source-code.html#example.-composite-strength-module"><em>Example.</em> Composite Strength Module</a></li>
</ul></li>
<li class="chapter" data-level="2.5" data-path="runtime-module-configuration.html"><a href="runtime-module-configuration.html"><i class="fa fa-check"></i><b>2.5</b> Runtime Module Configuration</a></li>
<li class="chapter" data-level="2.6" data-path="python-setup.html"><a href="python-setup.html"><i class="fa fa-check"></i><b>2.6</b> Python Setup</a></li>
</ul></li>
<li class="chapter" data-level="3" data-path="bqapi.html"><a href="bqapi.html"><i class="fa fa-check"></i><b>3</b> BQAPI</a></li>
<li class="chapter" data-level="4" data-path="bisque-development.html"><a href="bisque-development.html"><i class="fa fa-check"></i><b>4</b> BisQue Development</a><ul>
<li class="chapter" data-level="4.1" data-path="source-code-installation.html"><a href="source-code-installation.html"><i class="fa fa-check"></i><b>4.1</b> Source Code Installation</a><ul>
<li class="chapter" data-level="" data-path="source-code-installation.html"><a href="source-code-installation.html#clone-the-repository-and-prepare-virtual-environment"><i class="fa fa-check"></i>Clone the repository and Prepare Virtual Environment</a></li>
<li class="chapter" data-level="" data-path="source-code-installation.html"><a href="source-code-installation.html#configure-bisque-environment"><i class="fa fa-check"></i>Configure Bisque Environment</a></li>
<li class="chapter" data-level="" data-path="source-code-installation.html"><a href="source-code-installation.html#run-bisque-server"><i class="fa fa-check"></i>Run Bisque Server</a></li>
<li class="chapter" data-level="" data-path="source-code-installation.html"><a href="source-code-installation.html#upload-dataset"><i class="fa fa-check"></i>Upload Dataset</a></li>
<li class="chapter" data-level="" data-path="source-code-installation.html"><a href="source-code-installation.html#module"><i class="fa fa-check"></i>Module</a></li>
<li class="chapter" data-level="" data-path="source-code-installation.html"><a href="source-code-installation.html#debug-module"><i class="fa fa-check"></i>Debug Module</a></li>
<li class="chapter" data-level="" data-path="source-code-installation.html"><a href="source-code-installation.html#g.-module-mexui"><i class="fa fa-check"></i>G. Module MEX/UI</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="5" data-path="final-words.html"><a href="final-words.html"><i class="fa fa-check"></i><b>5</b> Final Words</a></li>
<li class="chapter" data-level="" data-path="references.html"><a href="references.html"><i class="fa fa-check"></i>References</a></li>
<li class="divider"></li>
<li><a href="https://bisque.ece.ucsb.edu/" target="blank">UCSB BisQue Cloud Platform</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./"></a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="module-xml" class="section level2">
<h2><span class="header-section-number">2.2</span> Module XML</h2>
<blockquote>
<p><strong>FILENAME: </strong> <code>NAME_OF_MODULE.xml</code>, where <code>NAME_OF_MODULE</code> is replaced by the name of your module, i.e. <code>Dream3D.xml</code>.</p>
</blockquote>
<p>The module definition file lays out the interface that the system can call the module with. The simplest form simply lists the name, location and arguments need to run the modules. Here is an example of a module definition document:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb2-1" title="1"><span class="kw"><module</span><span class="ot"> name=</span><span class="st">"MyData"</span><span class="ot"> type=</span><span class="st">"runtime"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb2-2" title="2"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"inputs"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb2-3" title="3"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"mex_url"</span><span class="ot"> type=</span><span class="st">"system-input"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb2-4" title="4"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"bisque_token"</span><span class="ot"> type=</span><span class="st">"system-input"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb2-5" title="5"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"image_url"</span><span class="ot"> type=</span><span class="st">"image"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb2-6" title="6"> <span class="kw"></tag></span></a>
<a class="sourceLine" id="cb2-7" title="7"> </a>
<a class="sourceLine" id="cb2-8" title="8"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"outputs"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb2-9" title="9"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"MetaData"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb2-10" title="10"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"MyData"</span><span class="ot"> type=</span><span class="st">"tag"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb2-11" title="11"> <span class="kw"></tag></span></a>
<a class="sourceLine" id="cb2-12" title="12"> </a>
<a class="sourceLine" id="cb2-13" title="13"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"help"</span><span class="ot"> value=</span><span class="st">"No help yet..."</span> <span class="kw">/></span> </a>
<a class="sourceLine" id="cb2-14" title="14"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"thumbnail"</span><span class="ot"> type=</span><span class="st">"file"</span><span class="ot"> value=</span><span class="st">"public/thumbnail.png"</span> <span class="kw">/></span> </a>
<a class="sourceLine" id="cb2-15" title="15"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"title"</span><span class="ot"> value=</span><span class="st">"MetaData"</span> <span class="kw">/></span> </a>
<a class="sourceLine" id="cb2-16" title="16"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"authors"</span><span class="ot"> value=</span><span class="st">"The Bisque Team"</span> <span class="kw">/></span> </a>
<a class="sourceLine" id="cb2-17" title="17"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"description"</span><span class="ot"> value=</span><span class="st">"This module annotates an image with its embedded metadata."</span> <span class="kw">/></span> </a>
<a class="sourceLine" id="cb2-18" title="18"><span class="kw"></module></span></a></code></pre></div>
<p>The definition above allows the bisque system to call the module by creating a MEX.</p>
<p>The module definition document is actually a templated MEX document. The template parameters in this case are used to render the UI for this module if the user does not want to fully implement the UI. More about this will follow.</p>
<p>A module can define inputs and outputs and rely on the automated interface generation or can provide a fully customized user interface delivered by the module server by proxying the data made available by the engine service. Input configurations may also be used by the modules that define their own interfaces since they can call renderers provided by the module service.</p>
<div id="module-description" class="section level3 unnumbered">
<h3>Module Description</h3>
<p>Each module has to be described in various way to be useful. Each module has a number required and optional parameters it has/may contain. Type in this case can control where the data is coming from, for example default “string” suggests the data is in-place. “file” directs the engine server to look for the file starting in the module root directory.</p>
<p><strong>Title</strong></p>
<div class="sourceCode" id="cb3"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"title"</span><span class="ot"> value=</span><span class="st">"MetaData"</span> <span class="kw">/></span> </a></code></pre></div>
<p><strong>Description</strong></p>
<div class="sourceCode" id="cb4"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"description"</span><span class="ot"> value=</span><span class="st">"This module annotates an image with its embedded metadata."</span> <span class="kw">/></span> </a></code></pre></div>
<p><strong>Authors</strong></p>
<div class="sourceCode" id="cb5"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"authors"</span><span class="ot"> value=</span><span class="st">"The Bisque team"</span> <span class="kw">/></span> </a></code></pre></div>
<p><strong>Thumbnail</strong></p>
<div class="sourceCode" id="cb6"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb6-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"thumbnail"</span><span class="ot"> type=</span><span class="st">"file"</span><span class="ot"> value=</span><span class="st">"public/thumbnail.png"</span> <span class="kw">/></span> </a></code></pre></div>
<p><strong>Help</strong></p>
<p>An HTML document with a module help that the user can be directed to the document can be inline.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb7-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"help"</span><span class="ot"> type=</span><span class="st">"file"</span><span class="ot"> value=</span><span class="st">"public/help.html"</span> <span class="kw">/></span> </a></code></pre></div>
<p><strong>Module Options</strong>:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb8-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"module_options"</span> <span class="kw">></span></a>
<a class="sourceLine" id="cb8-2" title="2"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"version"</span><span class="ot"> value=</span><span class="st">"2"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb8-3" title="3"><span class="kw"></tag></span></a></code></pre></div>
</div>
<div id="configurations-for-images-datasets-and-resources" class="section level3 unnumbered">
<h3>Configurations for Images, Datasets, and Resources</h3>
<p><strong>Label</strong></p>
<p>Specifies the label rendered before asking for a resource.</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb9-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"label"</span><span class="ot"> value=</span><span class="st">"Select input image"</span> <span class="kw">/></span></a></code></pre></div>
<p><strong>Accepted Type</strong></p>
<p>Defines multiple allowed types of input resource.</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb10-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"accepted_type"</span><span class="ot"> value=</span><span class="st">"dataset"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb10-2" title="2"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"accepted_type"</span><span class="ot"> value=</span><span class="st">"image"</span> <span class="kw">/></span></a></code></pre></div>
<p><strong>Prohibit Upload</strong></p>
<p>Used with resources of type image or dataset to specify that the uploader should not be allowed.</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb11-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"prohibit_upload"</span><span class="ot"> value=</span><span class="st">"true"</span><span class="ot"> type=</span><span class="st">"boolean"</span> <span class="kw">/></span></a></code></pre></div>
<p><strong>Example Query</strong></p>
<p>Allow a button “from Example” specifies the query string.</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb12-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"example_query"</span><span class="ot"> value=</span><span class="st">"*GFAP*"</span> <span class="kw">/></span></a></code></pre></div>
<p><strong>Allow Blank</strong></p>
<p>Makes resource optional.</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb13-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"allow_blank"</span><span class="ot"> value=</span><span class="st">"true"</span><span class="ot"> type=</span><span class="st">"boolean"</span> <span class="kw">/></span></a></code></pre></div>
<hr />
<div id="image-specific-configurations" class="section level4 unnumbered">
<h4><code>Image</code> Specific Configurations</h4>
<p><strong>Require Geometry</strong></p>
<p>Enforce input <em>image</em> geometry.</p>
<p>Here the <code>z</code> or <code>t</code> value may be:</p>
<ul>
<li>null or undefined - means it should not be enforced</li>
<li>‘single’ - only one plane is allowed</li>
<li>‘stack’ - only stack is allowed</li>
</ul>
<div class="sourceCode" id="cb14"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb14-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"require_geometry"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb14-2" title="2"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"z"</span><span class="ot"> value=</span><span class="st">"stack"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb14-3" title="3"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"t"</span><span class="ot"> value=</span><span class="st">"single"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb14-4" title="4"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"fail_message"</span><span class="ot"> value=</span><span class="st">"Only supports 3D images!"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb14-5" title="5"><span class="kw"></tag></span></a></code></pre></div>
<p><strong>Fail Message</strong></p>
<p>Specify a message to show if failed requires validation.</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb15-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"fail_message"</span><span class="ot"> value=</span><span class="st">"Only supports 3D images!"</span> <span class="kw">/></span></a></code></pre></div>
<hr />
</div>
<div id="gobject-specific-configurations" class="section level4 unnumbered">
<h4><code>gobject</code> Specific Configurations</h4>
<p><strong>Example</strong></p>
<div class="sourceCode" id="cb16"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb16-1" title="1"><span class="kw"><gobject</span><span class="ot"> name=</span><span class="st">"tips"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb16-2" title="2"> <span class="kw"><template></span></a>
<a class="sourceLine" id="cb16-3" title="3"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"gobject"</span><span class="ot"> value=</span><span class="st">"point"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb16-4" title="4"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"require_gobjects"</span><span class="kw">></span> </a>
<a class="sourceLine" id="cb16-5" title="5"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"amount"</span><span class="ot"> value=</span><span class="st">"many"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb16-6" title="6"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"fail_message"</span><span class="ot"> value=</span><span class="st">"Requires selection of root tips"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb16-7" title="7"> <span class="kw"></tag></span> </a>
<a class="sourceLine" id="cb16-8" title="8"> <span class="kw"></template></span></a>
<a class="sourceLine" id="cb16-9" title="9"><span class="kw"></gobject></span></a></code></pre></div>
<p><strong>gobject</strong></p>
<p>Defines multiple allowed types of input gobject.</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb17-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"gobject"</span><span class="ot"> value=</span><span class="st">"point"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb17-2" title="2"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"gobject"</span><span class="ot"> value=</span><span class="st">"polygon"</span> <span class="kw">/></span></a></code></pre></div>
<p>Semantic types can also be specified here:</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb18-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"gobject"</span><span class="ot"> value=</span><span class="st">"foreground"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb18-2" title="2"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"color"</span><span class="ot"> value=</span><span class="st">"#00FF00"</span><span class="ot"> type=</span><span class="st">"color"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb18-3" title="3"><span class="kw"></tag></span></a>
<a class="sourceLine" id="cb18-4" title="4"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"gobject"</span><span class="ot"> value=</span><span class="st">"background"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb18-5" title="5"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"color"</span><span class="ot"> value=</span><span class="st">"#FF0000"</span><span class="ot"> type=</span><span class="st">"color"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb18-6" title="6"><span class="kw"></tag></span></a></code></pre></div>
<p>Moreover, colors could be proposed for these semantic types to differentiate graphical annotations in modules visually.</p>
<p>Users can also force only semantic annotations to be created basically prohibiting creation of primitive graphical elements without semantic meaning:</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb19-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"semantic_types"</span><span class="ot"> value=</span><span class="st">"require"</span> <span class="kw">/></span></a></code></pre></div>
<p><strong>Require gobjects</strong></p>
<p>Validate input <em>gobject</em>.</p>
<div class="sourceCode" id="cb20"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb20-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"require_gobjects"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb20-2" title="2"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"amount"</span><span class="ot"> value=</span><span class="st">"many"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb20-3" title="3"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"fail_message"</span><span class="ot"> value=</span><span class="st">"Requires select of root tips"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb20-4" title="4"><span class="kw"></tag></span></a></code></pre></div>
<p>Configuration for <code>require_gobjects</code> consists of:</p>
<ul>
<li><strong>amount</strong> - constraint on the amount of objects of allowed type. The amount can take the following values:
<ul>
<li>null or undefined - means it should not be enforced</li>
<li>‘single’ - only one object is allowed</li>
<li>‘many’ - only more than one object allowed</li>
<li>‘oneornone’ - only one or none</li>
<li>number - exact number of objects allowed</li>
<li><p><span class="math inline">\(\leq X\)</span> - operand followed by a number, accepts: <span class="math inline">\(<,>,<=,>=,==\)</span></p>
<p>Example. Note that <span class="math inline">\(<\)</span> sign should be encoded in an XML attribute.</p>
<div class="sourceCode" id="cb21"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb21-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"amount"</span><span class="ot"> value=</span><span class="st">"3"</span><span class="ot"> type=</span><span class="st">"number"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb21-2" title="2">or</a>
<a class="sourceLine" id="cb21-3" title="3"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"amount"</span><span class="ot"> value=</span><span class="st">">=2"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb21-4" title="4">or</a>
<a class="sourceLine" id="cb21-5" title="5"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"amount"</span><span class="ot"> value=</span><span class="st">"</span><span class="dv">&lt;</span><span class="st">30"</span> <span class="kw">/></span></a></code></pre></div></li>
</ul></li>
</ul>
<p><strong>Fail Message</strong></p>
<p>Specify a message to show if failed requires validation.</p>
<div class="sourceCode" id="cb22"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb22-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"fail_message"</span><span class="ot"> value=</span><span class="st">"Requires select of root tips"</span> <span class="kw">/></span></a></code></pre></div>
<p><strong>Color</strong></p>
<p>Specify a default color for created gobjects</p>
<div class="sourceCode" id="cb23"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb23-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"color"</span><span class="ot"> value=</span><span class="st">"#00FFFF"</span><span class="ot"> type=</span><span class="st">"color"</span> <span class="kw">/></span></a></code></pre></div>
<p>Example with semantic types and other configuration:</p>
<div class="sourceCode" id="cb24"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb24-1" title="1"><span class="kw"><gobject</span><span class="ot"> name=</span><span class="st">"stroke"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb24-2" title="2"> <span class="kw"><template></span></a>
<a class="sourceLine" id="cb24-3" title="3"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"gobject"</span><span class="ot"> value=</span><span class="st">"freehand_line"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb24-4" title="4"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"gobject"</span><span class="ot"> value=</span><span class="st">"foreground"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb24-5" title="5"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"color"</span><span class="ot"> value=</span><span class="st">"#00FF00"</span><span class="ot"> type=</span><span class="st">"color"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb24-6" title="6"> <span class="kw"></tag></span></a>
<a class="sourceLine" id="cb24-7" title="7"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"gobject"</span><span class="ot"> value=</span><span class="st">"background"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb24-8" title="8"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"color"</span><span class="ot"> value=</span><span class="st">"#FF0000"</span><span class="ot"> type=</span><span class="st">"color"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb24-9" title="9"> <span class="kw"></tag></span></a>
<a class="sourceLine" id="cb24-10" title="10"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"semantic_types"</span><span class="ot"> value=</span><span class="st">"require"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb24-11" title="11"> </a>
<a class="sourceLine" id="cb24-12" title="12"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"require_gobjects"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb24-13" title="13"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"amount"</span><span class="ot"> value=</span><span class="st">">=2"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb24-14" title="14"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"fail_message"</span><span class="ot"> value=</span><span class="st">"Requires two polylines; </span></a>
<a class="sourceLine" id="cb24-15" title="15"><span class="st"> first one inside object of interest (foreground)</span></a>
<a class="sourceLine" id="cb24-16" title="16"><span class="st"> and second across background."</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb24-17" title="17"> <span class="kw"></tag></span></a>
<a class="sourceLine" id="cb24-18" title="18"> <span class="kw"></template></span></a>
<a class="sourceLine" id="cb24-19" title="19"><span class="kw"></gobject></span></a></code></pre></div>
<hr />
</div>
</div>
<div id="data-parallel-execution" class="section level3 unnumbered">
<h3>Data-Parallel Execution</h3>
<p>It is possible to execute any module in a data-parallel way by passing a dataset instead of an individual image. In order to do this you need to:</p>
<ol style="list-style-type: decimal">
<li>Indicate the resource that can be iterated on</li>
<li>Allow that resource to accept datasets and possibly</li>
<li>Configure renderers for iterated run</li>
</ol>
<div class="sourceCode" id="cb25"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb25-1" title="1"><span class="co"><!-- allow iterable resource to accept datasets --></span></a>
<a class="sourceLine" id="cb25-2" title="2"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"inputs"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb25-3" title="3"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"image_url"</span><span class="ot"> type=</span><span class="st">"resource"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb25-4" title="4"> <span class="kw"><template></span></a>
<a class="sourceLine" id="cb25-5" title="5"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"accepted_type"</span><span class="ot"> value=</span><span class="st">"image"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb25-6" title="6"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"accepted_type"</span><span class="ot"> value=</span><span class="st">"dataset"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb25-7" title="7"> ...</a>
<a class="sourceLine" id="cb25-8" title="8"> <span class="kw"></template></span></a>
<a class="sourceLine" id="cb25-9" title="9"> <span class="kw"></tag></span> </a>
<a class="sourceLine" id="cb25-10" title="10"> ...</a>
<a class="sourceLine" id="cb25-11" title="11"><span class="kw"></tag></span> </a>
<a class="sourceLine" id="cb25-12" title="12"></a>
<a class="sourceLine" id="cb25-13" title="13">...</a>
<a class="sourceLine" id="cb25-14" title="14"><span class="co"><!-- configure renderers for iterated run --></span></a>
<a class="sourceLine" id="cb25-15" title="15"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"outputs"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb25-16" title="16"> ... </a>
<a class="sourceLine" id="cb25-17" title="17"> <span class="co"><!-- Iterated outputs --></span></a>
<a class="sourceLine" id="cb25-18" title="18"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"mex_url"</span><span class="ot"> type=</span><span class="st">"mex"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb25-19" title="19"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"resource_url"</span><span class="ot"> type=</span><span class="st">"dataset"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb25-20" title="20"><span class="kw"></tag></span></a>
<a class="sourceLine" id="cb25-21" title="21"></a>
<a class="sourceLine" id="cb25-22" title="22">.....</a>
<a class="sourceLine" id="cb25-23" title="23"></a>
<a class="sourceLine" id="cb25-24" title="24"><span class="co"><!-- indicate the resource that can be iterated --></span></a>
<a class="sourceLine" id="cb25-25" title="25"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"execute_options"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb25-26" title="26"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"iterable"</span><span class="ot"> value=</span><span class="st">"image_url"</span><span class="ot"> type=</span><span class="st">"dataset"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb25-27" title="27"><span class="kw"></tag></span> </a></code></pre></div>
<p>This definition is used by the module UI to add a dataset selector for this image and let module server know by sending a proper MEX that this resource should be iterated upon. Module server will create a parallel execution iterating over the selected dataset and creating an output MEX with sub MEXes for each individual image.</p>
<p><strong>Other Data-Parallel Types</strong></p>
<p>One can also request parallel execution over resource types other than <code>dataset</code>. For example a very useful would be to request iteration over a MEX, where a module could accept parallelized MEX as input and iterate over sub-MEXs for parallelized processing of results. In order to do that we need to indicate the type of the input resource and additionally provide an xpath expression within that resource to find elements we would like to iterate over:</p>
<div class="sourceCode" id="cb26"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb26-1" title="1"><span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"execute_options"</span><span class="kw">></span></a>
<a class="sourceLine" id="cb26-2" title="2"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"iterable"</span><span class="ot"> value=</span><span class="st">"input_mex"</span><span class="ot"> type=</span><span class="st">"mex"</span> <span class="kw">></span></a>
<a class="sourceLine" id="cb26-3" title="3"> <span class="kw"><tag</span><span class="ot"> name=</span><span class="st">"xpath"</span><span class="ot"> value=</span><span class="st">"./mex/@uri"</span> <span class="kw">/></span></a>
<a class="sourceLine" id="cb26-4" title="4"> <span class="kw"></tag></span></a>
<a class="sourceLine" id="cb26-5" title="5"><span class="kw"></tag></span> </a></code></pre></div>
</div>
</div>
</section>
</div>
</div>
</div>
<a href="dockerfile.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="python-script-wrapper.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": false,
"facebook": true,
"twitter": true,
"google": false,
"linkedin": false,
"weibo": false,
"instapaper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"history": {
"link": null,
"text": null
},
"download": ["BisQue_Documentation.pdf", "BisQue_Documentation.epub"],
"toc": {
"collapse": "subsection"
}
});
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
var src = "true";
if (src === "" || src === "true") src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML";
if (location.protocol !== "file:")
if (/^https?:/.test(src))
src = src.replace(/^https?:/, '');
script.src = src;
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>