Further Customization

Module XML

circle-info

NOTE

FILENAME: NAME_OF_MODULE.xml, where NAME_OF_MODULE is replaced by the name of your module, i.e. Dream3D.xml.

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 needed to run the modules. Here is an example of a module definition document:


Example XML File

MetaData.xml
<?xml version="1.0" encoding="utf-8"?>
<module name="MetaData" type="runtime">

    <!-- Comments are OK -->
    <tag name="inputs">
        <tag name="image_url" type="resource">
            <template>
                <tag name="accepted_type" value="image" />
                <tag name="accepted_type" value="dataset" />
                <tag name="label" value="Image to extract metadata" />
                <tag name="prohibit_upload" value="true" type="boolean" />
            </template>
        </tag>

        <tag name="mex_url"  type="system-input" />
        <tag name="bisque_token"  type="system-input" />
    </tag>

    <tag name="outputs">
         <tag name="metadata" type="tag">
            <template>
                <tag name="label" value="Extracted metadata" />
            </template>
         </tag>
    </tag>

    <tag name="execute_options">
        <tag name="iterable" value="image_url" type="dataset" />
        <!-- Example for a blocked iteration -->
        <tag name="blocked_iter" value="true" />
    </tag>

    <tag name="module_options" >
        <tag name="version" value="3" />
    </tag>

    <tag name="display_options" >
       <tag name="group" value="Examples" />
    </tag>

    <tag name="help" type="file" value="public/help.html" />
    <tag name="thumbnail" type="file" value="public/thumbnail.png" />

    <tag name="title" type="string" value="MetaData" />
    <tag name="authors" type="string" value="The Bisque team" />
    <tag name="description" type="string" value="This module annotates an image with its embedded metadata." />
</module>

The definition above allows the BisQue system to call the module by creating a MEX.

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.

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.


Module Description

Each module has to be described in various ways to be useful. Each module has a number of required, as well as 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.

Title

Description

Authors

Thumbnail

Help

An HTML document with a module help that the user can be directed to the document can be inline.

Module Options:

Configurations for Images, Datasets, and Resources

Label

Specifies the label rendered before asking for a resource.

Accepted Type

Defines multiple allowed types of input resource.

Prohibit Upload

Used with resources of type image or dataset to specify that the uploader should not be allowed.

Example Query

Allow a button "from Example" specifies the query string.

Allow Blank

Makes resource optional.


Image Specific Configurations

Require Geometry

Enforce input image geometry.

Here the z or t value may be:

  • null or undefined - means it should not be enforced

  • 'single' - only one plane is allowed

  • 'stack' - only stack is allowed

Fail Message

Specify a message to show if failed requires validation.


gobject Specific Configurations

GObject Example

gobject

Defines multiple allowed types of input gobject.

Semantic types can also be specified here:

Moreover, colors could be proposed for these semantic types to differentiate graphical annotations in modules visually.

Users can also force only semantic annotations to be created basically prohibiting creation of primitive graphical elements without semantic meaning:

Require gobjects

Validate input gobject.

Configuration for require_gobjects consists of:

  • amount - constraint on the amount of objects of allowed type. The amount can take the following values:

    • null or undefined - means it should not be enforced

    • 'single' - only one object is allowed

    • 'many' - only more than one object allowed

    • 'oneornone' - only one or none

    • number - exact number of objects allowed

    • X\leq X - operand followed by a number, accepts:<,>,<=,>=,==<,>,<=,>=,==

    Example. Note that << sign should be encoded in an XML attribute.

Fail Message

Specify a message to show if failed requires validation.

Color

Specify a default color for created gobjects

Example with semantic types and other configuration:


string Specific Configurations

Label

Specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Units

Provides the string and possibly defines conversions, not all types support units, for example boolean does not:

Fail Message

Message that will be displayed if failed the check:

Minimum Length

Minimum length of the required string:

Maximum Length

Maximum length of the required string:

Allow Blank

Used to allow empty strings, true by default:

Regex

Regular expression used to validate input string:

Default Value

Default value of this field:

Editable

Whether this field is editable by the user, true by default:


number Specific Configurations

A number can select one or more values, in case of selecting multiple values they will be selected using a multi-slider.

Label

Simply specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Units

Provides the string and possibly defines conversions, not all types support units, for example boolean does not:

Fail Message

Message that will be displayed if failed the check:

Minimum Value

Lowest allowed value:

Maximum Value

Highest allowed value:

Allow Decimals

Allow to acquire floating point numbers:

Decimal Precision

How many digits after the dot are allowed:

Default Value

Default value of this field:

Editable

Whether this field is editable by the user, true by default:

Step

Step to be used by increment/decrement buttons:

Show Slider

Allows hiding the slider in case of single value picking:

Hide Number Picker

Allows hiding the number selection box if only slider is preferred:

Multiple Values

Using multiple values:


combo Specific Configurations

Label

Simply specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Units

Provides the string and possibly defines conversions, not all types support units, for example boolean does not:

Select

Specifies a list of select elements, provide as many as you need, this might have to be implemented as a list of values?:

Passed Values

Specifies a list of values passed for the corresponding select elements, this might have to be implemented as a list of values?:

Failed Value

If the combo's value is same as fail_value, combo's input is considered invalid and the fail_message is displayed:

Fail Message

Error message that will be displayed if combo's value is null or same as fail_value:

Editable

Allows a combo box string to be edited directly and would allow input of values not existent in the select list:


boolean Specific Configurations

Label

Simply specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Fail Message

Message that will be displayed if failed the check:

Default Value

Default value of this field:

Editable

Whether this field is editable by the user, true by default:


date Specific Configurations

This renderer allow you to pick both date and time.

NOTE. Value contains a string in ISO standard, ex: YYYY:MM:DDThh:mm:ss

No Date

Can hide the date picker:

No Time

Can hide the time picker:

Label

Simply specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Fail Message

Message that will be displayed if failed the check:

Format

Date format used by this field, default value is : YYYY:MM:DDThh:mm:ss

Editable

Whether this field is editable by the user, true by default:


Default Value

Default value of this field:

Editable

Whether this field is editable by the user, true by default:


email Specific Configurations

Default Value

Default value of this field:

Editable

Whether this field is editable by the user, true by default:


bisqueresource Specific Configurations

Resource Type

Type of bisque resource to be selected, image by default:

Default Value

Default value of this field:

Editable

Whether this field is editable by the user, true by default:


annotation_status Specific Configurations

This element allows marking resources with annotation status as:

  • STARTED

  • FINISHED

  • APPROVED


image_channel Specific Configurations

Example of Image Channel

Label

Simply specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Fail Message

Message that will be displayed if failed the check:

Reference

Name of the input resource that should be used to initialize this selector:

Guess

Regular expression used to guess which channel should be selected by default:

Allow None

Allows selection of 'None' channel, used for optional channel selection:


pixel_resolution Specific Configurations

This element must have for values that represent X, Y, Z and T resolution values in microns, microns, microns and seconds respectively.

Example

Label

Simply specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Fail Message

Message that will be displayed if failed the check:

Reference

Name of the input resource that should be used to initialize this selector:

Units

Provides the string and possibly defines conversions, not all types support units, for example boolean does not:

Description

Used to show tool tip information:


annotation_attr Specific Configurations

This element allows select attributes of annotations (tags/gobjects) from either whole database or constrained by a dataset. For example it can be used to select a type out of a list of all types of graphical annotations.

Example

Label

Simply specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Reference Dataset

Name of the input resource that can be used to initialize this selector's constrained query:

Reference Type

Name of the type selector that can be used to initialize this selector's constrained query:

Reference Attribute

Name of the attribute selector that can be used to initialize this selector's constrained query:

Element

Default value for the element to constraine query:

Attribute

Default value for the attribute to constrain query:

Dataset

Default value for the dataset to constrain query:


mex Specific Configurations

This element selects a previously run module execution in order to chain modules.

Example

Label

Simply specifies the label rendered before asking for a resource:

Description

Provides larger description shown in the tool-tip:

Query

A query string that would narrow MEX search:

Query Selected Resource

This option allows MEX selector to pretend it is an image resource selector by finding the name of the required resource in the selected MEX and emitting selection signal. This can be used for MEX selectors that would like to init image resolution or image channel pickers based on an input MEX:


Data-Parallel Execution

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:

  1. Indicate the resource that can be iterated on

  2. Allow that resource to accept datasets and possibly

  3. Configure renderers for iterated run

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.

Other Data-Parallel Types

One can also request parallel execution over resource types other than dataset. 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:

Last updated