Beispiel #1
0
def generate_config(filters=[TRANSLATE[key] for key in FILTERS]):

    #Set Outputs and inputs
    config = [
        a3.Input('Source Image', a3.types.ImageFloat),
        a3.Input('Mask Image', a3.types.ImageFloat),
        a3.Output('Analyzed Image', a3.types.ImageFloat),
        a3.Output('Analyzed Binary', a3.types.ImageFloat),
        a3.Output('Analyzed Database', a3.types.GeneralPyType)
    ]

    #Set parameters
    for f in filters:
        for m in ['min', 'max']:
            config.append(
                a3.Parameter('{} {}'.format(
                    f, m), a3.types.float).setFloatHint(
                        'default',
                        0 if m == 'min' else float(math.inf)).setFloatHint(
                            'unusedValue',
                            0 if m == 'min' else float(math.inf)))

    switch_list = [
        a3.Parameter('Keep/Remove filtered objects',
                     a3.types.bool).setBoolHint("default", False),
        a3.Parameter('Filter objects on border',
                     a3.types.bool).setBoolHint("default", False),
        a3.Parameter('Volume in pixels/um\u00B3',
                     a3.types.bool).setBoolHint("default", False)
    ]
    config.extend(switch_list)

    return config
def generate_config():

    #Set Outputs and inputs
    config = [
        a3.Input('ChA Image', a3.types.ImageFloat),
        a3.Input('ChB Image', a3.types.ImageFloat),
        a3.Input('ChA Thresholded', a3.types.GeneralPyType),
        a3.Input('ChB Thresholded', a3.types.GeneralPyType),
        a3.Output('ChA Image', a3.types.ImageFloat),
        a3.Output('ChB Image', a3.types.ImageFloat),
        a3.Output('ChA Thresholded', a3.types.ImageFloat),
        a3.Output('ChB Thresholded', a3.types.ImageFloat)
    ]

    return config
Beispiel #3
0
def generate_config(methods=METHODS):

    #Set Outputs and inputs
    config = [
        a3.Input('File Path', a3.types.url),
        a3.Input('Output Path', a3.types.url),
        a3.Input('Input Image', a3.types.GeneralPyType),
        a3.Output('Thresholded Image', a3.types.GeneralPyType)
    ]

    #Set parameters
    param = a3.Parameter('Method', a3.types.enum)
    for idx, m in enumerate(methods):
        param.setIntHint(str(m), idx)

    config.append(param)
    config.append(
        a3.Parameter('Manual threshold value',
                     a3.types.float).setFloatHint('default', float(math.inf)))
    #.setFloatHint('unusedValue', float(math.inf))
    #.setFloatHint('stepSize', 1))
    config.append(a3.Parameter('Slice/Stack histogram', a3.types.bool))

    switch_list = [
        a3.Parameter('Save Threshold(s)',
                     a3.types.bool).setBoolHint("default", True),
        a3.Parameter('Save Image',
                     a3.types.bool).setBoolHint("default", False)
    ]
    config.extend(switch_list)

    return config
def init_config(methods=METHODS):

    config = [a3.Input('Input Image', a3.types.ImageFloat)]

    method_param = a3.Parameter('Method', a3.types.enum)
    for idx, m in enumerate(methods):
        method_param.setIntHint(str(m), idx)
    config.append(method_param)

    #Add inputfield for BlockSize
    param_blocksize = a3.Parameter('BlockSize', a3.types.float)
    param_blocksize.setIntHint('min', 2)
    param_blocksize.setIntHint('max', 800)
    param_blocksize.setIntHint('stepSize', 1),
    config.append(param_blocksize)

    #Add inputfield for Offset
    param_offset = a3.Parameter('Offset', a3.types.float)
    param_offset.setIntHint('min', 0)
    param_offset.setIntHint('max', 800)
    param_offset.setIntHint('stepSize', 1),
    config.append(param_offset)

    config.append(a3.Output('Output Image', a3.types.ImageFloat))

    return config
Beispiel #5
0
def generate_config(filters=FILTERS):

    #Set Outputs and inputs
    config = [
        a3.Input('File Path', a3.types.url),
        a3.Input('Output Path', a3.types.url),
        a3.Input('ChA Image', a3.types.GeneralPyType),
        a3.Input('ChA DataBase', a3.types.GeneralPyType),
        a3.Input('ChB Image', a3.types.GeneralPyType),
        a3.Input('ChB DataBase', a3.types.GeneralPyType),
        a3.Output('Overlapping Image', a3.types.GeneralPyType),
        a3.Output('Overlapping Binary', a3.types.GeneralPyType),
        a3.Output('Overlapping DataBase', a3.types.GeneralPyType),
        a3.Output('Overlapping Path', a3.types.url)
    ]

    #Set parameters
    for f in filters:

        for m in ['min', 'max']:

            config.append(
                a3.Parameter('{} {}'.format(
                    TRANSLATE[f], m), a3.types.float).setFloatHint(
                        'default',
                        0 if m == 'min' else DEFAULT_VALUE[f]).setFloatHint(
                            'default', 0
                            if m == 'min' else DEFAULT_VALUE[f]).setFloatHint(
                                'unusedValue',
                                0 if m == 'min' else DEFAULT_VALUE[f]))

    switch_list = [
        a3.Parameter('Keep/Remove filtered objects',
                     a3.types.bool).setBoolHint("default", False),
        a3.Parameter('Volume in pixels/um\u00B3',
                     a3.types.bool).setBoolHint("default", False),
        a3.Parameter('Save to xlsx/text', a3.types.bool)
    ]
    config.extend(switch_list)

    return config
Beispiel #6
0
def generate_config(methods=METHODS):

    #Set Outputs and inputs
    config = [
        a3.Input('Input Image', a3.types.ImageFloat),
        a3.Output('Image', a3.types.GeneralPyType),
        a3.Output('Thresholded Image', a3.types.GeneralPyType)
    ]

    #Set parameters
    param = a3.Parameter('Method', a3.types.enum)
    for idx, m in enumerate(methods):
        param.setIntHint(str(m), idx)

    config.append(param)
    config.append(
        a3.Parameter('Manual threshold value',
                     a3.types.float).setFloatHint('default', float(math.inf)))
    #.setFloatHint('unusedValue', float(math.inf))
    #.setFloatHint('stepSize', 1))
    config.append(a3.Parameter('Slice/Stack histogram', a3.types.bool))

    return config
def generate_config(methods=METHODS):

    config = [
        a3.Input('Input Image', a3.types.ImageFloat),
        a3.Output('Output Image', a3.types.ImageFloat)
    ]

    param = a3.Parameter('Method', a3.types.enum)
    for idx, m in enumerate(methods):
        param.setIntHint(str(m), idx)

    config.append(param)

    config.append(a3.Parameter('Stack Histogram', a3.types.bool))

    return config
Beispiel #8
0
def generate_config():

    config = [
        a3.Input('Input Image', a3.types.ImageFloat),
        a3.Output('Output Image', a3.types.ImageFloat)
    ]

    #Add inputfield for Upper threshold
    param_upper = a3.Parameter('Upper', a3.types.float)
    #param_upper.setIntHint('min', 0)
    #param_upper.setIntHint('max', 65535)
    param_upper.setIntHint('stepSize', 1),
    config.append(param_upper)

    #Add inputfield for Lower threshold
    param_lower = a3.Parameter('Lower', a3.types.float)
    #param_lower.setIntHint('min', 0)
    #param_lower.setIntHint('max', 65535)
    param_lower.setIntHint('stepSize', 1),
    config.append(param_lower)

    return config
Beispiel #9
0
        #img.metadata['Path']=filename

        #Create Output
        #Extract channel from image array
        a3.outputs['Channel 1'] = img.get_dimension(a3.inputs['Channel'],
                                                    'C').to_multidimimage()
        #to_multidimimage(Image(array.astype(np.float),copy.deepcopy(img.metadata)))

        #Finalization
        tstop = time.clock()
        print('Processing finished in ' + str((tstop - tstart)) + ' seconds! ')
        print('Image loaded successfully!')
        print(SEPARATOR)

    except Exception as e:
        raise error("Error occured while executing '" + str(ctx.type()) +
                    "' module '" + str(ctx.name()) + "' !",
                    exception=e)


config = [
    a3.Parameter('Channel',
                 a3.types.int8).setFloatHint('default',
                                             0).setFloatHint('unusedValue', 0),
    a3.Input('Image', a3.types.GeneralPyType),
    a3.Input('MetaData', a3.types.GeneralPyType),
    a3.Output('Channel', a3.types.ImageFloat)
]

a3.def_process_module(config, module_main)
        a3.outputs['first selected channel'] = input_channels[sel_1]
    else:
        raise RuntimeError('invalid value for \'first selected channel\': {}'
                           .format(sel_1))

    if 0 <= sel_2 < 4:
        a3.outputs['second selected channel'] = input_channels[sel_2]
    else:
        raise RuntimeError('invalid value for \'second selected channel\': {}'
                           .format(sel_1))


config = [a3.Input('channel 1', a3.types.ImageFloat),
          a3.Input('channel 2', a3.types.ImageFloat),
          a3.Input('channel 3', a3.types.ImageFloat),
          a3.Input('channel 4', a3.types.ImageFloat),
          a3.Parameter('first selected channel', a3.types.enum)
            .setIntHint("channel 1", 0)
            .setIntHint("channel 2", 1)
            .setIntHint("channel 3", 2)
            .setIntHint("channel 4", 3),
          a3.Parameter('second selected channel', a3.types.enum)
            .setIntHint("channel 1", 0)
            .setIntHint("channel 2", 1)
            .setIntHint("channel 3", 2)
            .setIntHint("channel 4", 3),
          a3.Output('first channel', a3.types.ImageFloat),
          a3.Output('second channel', a3.types.ImageFloat)]

a3.def_process_module(config, module_main)
Beispiel #11
0
import a3dc_module_interface as a3
from modules.a3dc_modules.a3dc.utils import error
import os


def module_main(ctx):

    if os.path.isfile(a3.inputs['File'].path):
        a3.outputs['File'] = a3.inputs['File']
    else:
        error(
            "Error occured while executing '" + str(ctx.type()) +
            "' module '" + str(ctx.name()) + "' !",
            OSError('Path is not a file!'))


config = [
    a3.Parameter('File', a3.types.url).setBoolHint('folder', False),
    a3.Output('File', a3.types.url)
]

a3.def_process_module(config, module_main)
Beispiel #12
0
import a3dc_module_interface as a3
from scipy.ndimage.measurements import label
import numpy as np

def module_main(ctx):
    input_image = a3.MultiDimImageFloat_to_ndarray(a3.inputs['binary volume'])
    structure = np.array([
        [[0,0,0],[0,1,0],[0,0,0]],
        [[0,1,0],[1,1,1],[0,1,0]],
        [[0,0,0],[0,1,0],[0,0,0]]])
    labeled_image, _ = label(input_image, structure)
    print(labeled_image)
    a3.outputs['labeled volume'] = a3.MultiDimImageUInt32_from_ndarray(labeled_image)
    print('object labeling complete 🔖')


config = [a3.Input('binary volume', a3.types.ImageFloat),
    a3.Output('labeled volume', a3.types.ImageUInt32)]

a3.def_process_module(config, module_main)
        #Load and reshape image
        img = VividImage.load(filename, file_type='ome')
        img.reorder('XYZCT')
        
        #Print important image parameters
        print_line_by_line(str(img))
        
        #Create Output
        a3.outputs['Array'] = img.image
        a3.outputs['MetaData']=img.metadata
        
        #Add path and filename to metadata
        a3.outputs['MetaData']['Path']=os.path.dirname(filename)
        a3.outputs['MetaData']['FileName']=os.path.basename(filename)
        
        #Finalization
        tstop = time.clock()
        print('Processing finished in ' + str((tstop - tstart)) + ' seconds! ')
        print('Image loaded successfully!')
        print(SEPARATOR)

    except Exception as e:
        raise error("Error occured while executing '"+str(ctx.type())+"' module '"+str(ctx.name())+"' !",exception=e)

config = [a3.Input('FileName', a3.types.url),
    a3.Output('Array', a3.types.GeneralPyType),
    a3.Output('MetaData', a3.types.GeneralPyType)]
    

a3.def_process_module(config, module_main)
Beispiel #14
0
import numpy as np


def module_main(ctx):
    w = a3.inputs['width']
    h = a3.inputs['height']
    d = a3.inputs['depth']
    seed = a3.inputs['seed']
    nlabels = a3.inputs['number of labels']
    np.random.seed(seed)

    vol = np.random.randint(nlabels, size=(w, h, d)).astype(np.uint32)

    a3.outputs['labels'] = a3.MultiDimImageUInt32_from_ndarray(vol)
    print('your labeled volume is ready!🎲')


config = [
    a3.Parameter('width', a3.types.uint16).setIntHint('min', 1).setIntHint(
        'max', 2048).setIntHint('default', 64),
    a3.Parameter('height', a3.types.uint16).setIntHint('min', 1).setIntHint(
        'max', 2048).setIntHint('default', 64),
    a3.Parameter('depth', a3.types.uint16).setIntHint('min', 1).setIntHint(
        'max', 2048).setIntHint('default', 16),
    a3.Parameter('seed', a3.types.uint16).setIntHint('default', 42),
    a3.Parameter('number of labels', a3.types.uint16).setIntHint('default', 5),
    a3.Output('labels', a3.types.ImageUInt32)
]

a3.def_process_module(config, module_main)
Beispiel #15
0
import a3dc_module_interface as a3

def module_main(ctx):
    
    a3.outputs['Directory']=a3.inputs['Directory']
    #if os.path.isdir(a3.inputs['Directory'].path):
        #a3.outputs['Directory']=a3.inputs['Directory']
    #else:
        #error("Error occured while executing '"+str(ctx.type())+"' module '"+str(ctx.name())+"' !", OSError('Path is not a directory!'))
    
config = [
    a3.Parameter('Directory', a3.types.url).setBoolHint('folder', True),
    a3.Output('Directory',  a3.types.url)]

a3.def_process_module(config, module_main)
            print(res)

        #Output
        a3.outputs['Raw Image'] = ch_1.to_multidimimage()
        a3.outputs['Thresholded Image'] = ch_1_thr.to_multidimimage()

        #Finalization
        tstop = time.clock()
        print('Processing finished in ' + str((tstop - tstart)) + ' seconds! ')
        print('Image loaded successfully!')
        print(SEPARATOR)

    except Exception as e:
        raise error("Error occured while executing '" + str(ctx.type()) +
                    "' module '" + str(ctx.name()) + "' !",
                    exception=e)


config = [
    a3.Input('FileName', a3.types.url),
    a3.Parameter('Channel A', a3.types.int8).setIntHint('default', 1)
    #.setIntHint('max', 8)
    .setIntHint('min', 1),
    #.setIntHint('unusedValue', 1),
    a3.Output('Raw Image', a3.types.ImageFloat),
    a3.Output('Thresholded Image', a3.types.ImageFloat)
]

a3.def_process_module(config, module_main)
import numpy as np


def module_main(ctx):
    w = a3.inputs['width']
    h = a3.inputs['height']
    d = a3.inputs['depth']
    seed = a3.inputs['seed']
    np.random.seed(seed)

    vol = np.random.rand(w, h, d)

    print('your volume is ready! 🍻')
    a3.outputs['volume'] = a3.MultiDimImageFloat_from_ndarray(vol)


config = [
    a3.Parameter('width', a3.types.uint16).setIntHint('min', 1)
                                          .setIntHint('max', 2048)
                                          .setIntHint('default', 64),
    a3.Parameter('height', a3.types.uint16).setIntHint('min', 1)
                                           .setIntHint('max', 2048)
                                           .setIntHint('default', 64),
    a3.Parameter('depth', a3.types.uint16).setIntHint('min', 1)
                                          .setIntHint('max', 2048)
                                          .setIntHint('default', 16),
    a3.Parameter('seed', a3.types.uint16).setIntHint('default', 42),
    a3.Output('volume', a3.types.ImageFloat)]

a3.def_process_module(config, module_main)
Beispiel #18
0
    if os.path.isfile(path):
        file_list.remove(path)
        file_list.insert(0, path)

    if len(file_list) == 0:
        raise Warning('path {} is empty'.format(base_dir))

    index = ctx.run_id()
    if index < len(file_list) - 1:
        ctx.set_require_next_run(True)
    else:
        ctx.set_require_next_run(False)

    url = a3.Url()
    url.path = file_list[index]

    #Print current filename and index
    _, curr_filename = os.path.split(url.path)
    print('Currently processing:', curr_filename)

    #Set output
    a3.outputs['file'] = url

    print(SEPARATOR)


config = [a3.Parameter('path', a3.types.url), a3.Output('file', a3.types.url)]

def_process_module(config, module_main)
Beispiel #19
0
    level = a3.inputs['level']
    # TODO: this is a naive way, we should not copy the data with
    # MultiDimImageFloat_to_ndarray and MultiDimImageFloat_from_ndarray
    # but do the leveling in-place
    input_image = a3.MultiDimImageFloat_to_ndarray(a3.inputs['input'])

    if a3.inputs['input'].meta.has('type'):
        print('type', a3.inputs['input'].meta.get('type'))

    if a3.inputs['input'].meta.has('normalized'):
        print('normalized', a3.inputs['input'].meta.get('normalized'))

    if a3.inputs['input'].meta.has('path'):
        print('path', a3.inputs['input'].meta.get('path'))

    if a3.inputs['input'].meta.has('channel'):
        print('channel', a3.inputs['input'].meta.get('channel'))

    print(str(a3.inputs['input'].meta))

    bin_image = (input_image >= level) * 1.0
    a3.outputs['binary volume'] = a3.MultiDimImageFloat_from_ndarray(bin_image)
    print('binarization complete 🍰')


config = [a3.Input('input', a3.types.ImageFloat),
    a3.Parameter('level', a3.types.float),
    a3.Output('binary volume', a3.types.ImageFloat)]

a3.def_process_module(config, module_main)
    a3.Parameter('wow', a3.types.int8),
    a3.Parameter('so filename', a3.types.url),
    a3.Parameter('wow integer', a3.types.int8).setIntHint('min', 2).setIntHint(
        'unusedValue', 42).setIntHint('max', 64),
    a3.Parameter('much float',
                 a3.types.float).setFloatHint('min', -0.5).setFloatHint(
                     'unusedValue', -0.2)
    # .setFloatHint('max', 1.72)
    .setFloatHint('stepSize', 0.1),
    a3.Parameter('very bool', a3.types.bool),
    a3.Parameter('so enum', a3.types.enum).setIntHint("option1", 0).setIntHint(
        "option2", 1).setIntHint("option3", 42),
    a3.Parameter('int16 in [-7, 9674]',
                 a3.types.int16).setIntHint('min', -7).setIntHint('max', 9674),
    a3.Parameter('uint16 in [42, 72000]',
                 a3.types.uint16).setIntHint('min',
                                             42).setIntHint('max', 72000),
    a3.Parameter('uint32 in [42, 72000]',
                 a3.types.uint32).setIntHint('min',
                                             42).setIntHint('max', 72000),
    a3.Output('string output', a3.types.string),
    a3.Output('filename output', a3.types.url),
    a3.Output('int output', a3.types.int8),
    a3.Output('float output', a3.types.float),
    a3.Output('bool output', a3.types.bool),
    a3.Output('enum int output', a3.types.int32),
    a3.Output('pyobject output', a3.types.GeneralPyType)
]

a3.def_process_module(config, module_main)
Beispiel #21
0
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 14 09:02:31 2018

@author: pongor.csaba
"""

import a3dc_module_interface as a3


def module_main(ctx):

    a3.outputs['float output'] = a3.inputs['much float']

    print('much float: {}'.format(a3.inputs['much float']))


config = [
    a3.Parameter('much float',
                 a3.types.float).setIntHint('min', -5).setIntHint(
                     'unusedValue', 1000),
    a3.Parameter('very bool', a3.types.bool).setBoolHint('s', False),
    # .setFloatHint('max', 1.72)
    #.setFloatHint('stepSize', 0.1),
    a3.Output('float output', a3.types.float)
]

a3.def_process_module(config, module_main)
Beispiel #22
0
    x, y, z = np.meshgrid(x_, y_, z_, indexing='ij')
    sp1 = np.maximum(
        0, 32 - np.sqrt(
            np.square(x - c1[0]) + np.square(y - c1[1]) +
            np.square(z - c1[2])))
    sp2 = np.maximum(
        0, 32 - np.sqrt(
            np.square(x - c2[0]) + np.square(y - c2[1]) +
            np.square(z - c2[2])))

    a3.outputs['sphere 1'] = a3.MultiDimImageFloat_from_ndarray(sp1)
    a3.outputs['sphere 2'] = a3.MultiDimImageFloat_from_ndarray(sp2)


config = [
    a3.Parameter('width', a3.types.uint16).setIntHint('min', 1).setIntHint(
        'max', 2048).setIntHint('default', 64),
    a3.Parameter('height', a3.types.uint16).setIntHint('min', 1).setIntHint(
        'max', 2048).setIntHint('default', 64),
    a3.Parameter('depth', a3.types.uint16).setIntHint('min', 1).setIntHint(
        'max', 2048).setIntHint('default', 16),
    a3.Parameter('sphere 1 x', a3.types.uint16).setIntHint(
        'min', 1).setIntHint('max', 2048).setIntHint('default', 24),
    a3.Parameter('sphere 2 y', a3.types.uint16).setIntHint(
        'min', 1).setIntHint('max', 2048).setIntHint('default', 48),
    a3.Output('sphere 1', a3.types.ImageFloat),
    a3.Output('sphere 2', a3.types.ImageFloat)
]

a3.def_process_module(config, module_main)
Beispiel #23
0
        ch_2.reorder('ZYXCT')
        a3.outputs['Channel B'] = ch_2

        #Finalization
        tstop = time.process_time()
        print('Processing finished in ' + str((tstop - tstart)) + ' seconds! ')
        print('Image loaded successfully!')
        print(SEPARATOR)

    except Exception as e:
        raise error("Error occured while executing '" + str(ctx.type()) +
                    "' module '" + str(ctx.name()) + "' !",
                    exception=e)


config = [
    a3.Input('FileName', a3.types.url),
    a3.Parameter('Channel A', a3.types.int8).setIntHint('default', 1)
    #.setIntHint('max', 8)
    .setIntHint('min', 1),
    #.setIntHint('unusedValue', 1),
    a3.Parameter('Channel B', a3.types.int8).setIntHint('default', 2)
    #.setIntHint('max', 8)
    .setIntHint('min', 1),
    #.setIntHint('unusedValue', 1),
    a3.Output('Channel A', a3.types.GeneralPyType),
    a3.Output('Channel B', a3.types.GeneralPyType)
]

a3.def_process_module(config, module_main)
    # unique labels for the intersections
    intersection_labels = intersection_mask * (labeled_2 * n_1 + labeled_1)
    ids_1 = labeled_1[intersection_mask].ravel()
    ids_int = intersection_labels[intersection_mask].ravel()
    ids_2 = labeled_2[intersection_mask].ravel()
    # intersecting label triplets
    intersecting_ids = np.unique(np.c_[ids_1, ids_int, ids_2], axis=0)
    return intersecting_ids, intersection_labels


def module_main(ctx):
    input_A = a3.MultiDimImageUInt32_to_ndarray(a3.inputs['labeled A'])
    input_B = a3.MultiDimImageUInt32_to_ndarray(a3.inputs['labeled B'])

    intersecting_ids, intersection_labels = intersect_labels(input_A, input_B)

    a3.outputs['labeled intersection'] = \
        a3.MultiDimImageUInt32_from_ndarray(intersection_labels.astype(np.uint32))
    a3.outputs['label pair list'] = intersecting_ids
    print('labeled intersections are ready ✨')


config = [
    a3.Input('labeled A', a3.types.ImageUInt32),
    a3.Input('labeled B', a3.types.ImageUInt32),
    a3.Output('labeled intersection', a3.types.ImageUInt32),
    a3.Output('label pair list', a3.types.GeneralPyType)
]

a3.def_process_module(config, module_main)
Beispiel #25
0
        #Create Output 1
        ch_1_Nb = a3.inputs['Channel'] - 1
        ch_1 = img.get_dimension(ch_1_Nb, 'C')
        ch_1.metadata['Path'] = filename
        ch_1.reorder('ZYXCT')
        a3.outputs['Channel'] = ch_1

        #Finalization
        tstop = time.clock()
        print('Processing finished in ' + str((tstop - tstart)) + ' seconds! ')
        print('Image loaded successfully!')
        print(SEPARATOR)

    except Exception as e:
        raise error("Error occured while executing '" + str(ctx.type()) +
                    "' module '" + str(ctx.name()) + "' !",
                    exception=e)


config = [
    a3.Input('FileName', a3.types.url),
    a3.Parameter('Channel', a3.types.int8).setIntHint('default', 1)
    #.setIntHint('max', 8)
    .setIntHint('min', 1),
    #.setIntHint('unusedValue', 1),
    a3.Output('Channel', a3.types.GeneralPyType)
]

a3.def_process_module(config, module_main)
Beispiel #26
0
import a3dc_module_interface as a3
from modules.a3dc_modules.a3dc.utils import error
import os


def module_main(ctx):

    if os.path.exists(a3.inputs['Path'].path):
        a3.outputs['Path'] = a3.inputs['Path']
    else:
        error("Error occured while executing '" + str(ctx.type()) +
              "' module '" + str(ctx.name()) + "'! Invalid path!!")


config = [a3.Parameter('Path', a3.types.url), a3.Output('Path', a3.types.url)]

a3.def_process_module(config, module_main)