dataIO

class itom.dataIO

dataIO(name[, mandparams, optparams]) -> constructor

Parameters :

name : {str}

is the fullname (case sensitive) of a ‘dataIO’-plugin as specified in the plugin-window. initParameters : {variant}, mandatory & optional Parameters to pass to the plugin, content and type depend on the specific plugin.

Returns :

Returns none or a PyDictionary depending on the value of detailLevel. :

Notes

This is the constructor for a dataIO-type plugins. It initializes an new instance if the plugin specified by ‘name’. The initialisation parameters are parsed and unnamed parameters are used in their incoming order to fill first mandatory parameters and afterwards optional parameters. Parameters may be passed with name as well but after the first named parameter no more unnamed parameters are allowed. See pluginHelp(name) for detail information about the specific initialisation parameters.

acquire(trigger=dataIO.TRIGGER_SOFTWARE) → triggers the camera acquisition

Use this command to start the image acquisition depending on the trigger parameter.

Parameters :

trigger : {Integer}, optional

default = 0, dataIO.TRIGGER_SOFTWARE In case of dataIO.TRIGGER_SOFTWARE (0) the acquisition is immediately started after this command.

copyVal(dataObject) → gets deep copy of data of this plugin, stored in the given data object.
Parameters :dataObject : {doctodo}

Notes

The object is not changed / adepted to the grabber and must be allocated properly before copyVal is called

disableAutoGrabbing() → Disables auto grabbing for the grabber (camera...),

Notes

such that live images only will be updated if a new image is manually grabbed. [Recommended if the measurement routine requires camera images by itself.]

enableAutoGrabbing() → enables auto grabbing for the grabber (camera...),

Notes

such that live images will continuously get new data. [Recommended if the measurement routine does not need any camera image at the moment.]

exec(funcName[, param1, ...]) → invoke a function 'funcName' within an dataIO-plugin.
Parameters :

funcName : {str}

The name of the filter

paramN : {variant}

Further parameters depend on the function itself.

Returns :

Variable return values. :

The return values depend on the function itself.

Notes

This function is used to invoke a plugIn-Specific execFunc, declared within the corresponding plugin. The parameters (arguments), output parameters / return values depends on the function (see plugin.getExecFuncsInfo() or plugin.getExecFuncsInfo(funcName)).

getAutoGrabbing() → returns the status of the auto grabbing flag.
Returns :

auto grabbing flag : {bool}

  • false = auto grabbing off
  • true = auto grabbing on.

Notes

See methods enableAutoGrabbing() or disableAutoGrabbing().

getExecFuncsInfo([funcName[, detailLevel]]) → plots a list of available execFuncs or a detailed description to the specified execFunc.
Parameters :

funcName : {str}, optional

is the fullname or a part of any execFunc-name which should be displayed. If funcName is none or no execFunc matches funcName casesensitiv a list with all suitable execFuncs is given.

detailLevel : {dict}, optional

if dictionary == 1, function returns an Py_Dictionary with parameters Default value is 0.

Returns :

None or Dict :

depending on the value of detailLevel.

Notes

Generates an online help with all execFuncs for this plugIn or returns a list of available execFuncs.

getParam(name) → returns the value of the given parameter.
Parameters :name : {str???}
Returns :Value of the given parameter :

Notes

doctodo

getParamList() → returns list of possible parameters.
Returns :List of possible Parameters :

Notes

doctodo

getParamListInfo([detailLevel]) → plots informations about plugin parameters.
Parameters :

detailLevel : {dict}, optional

if dictionary == 1, function returns an Py_Dictionary with parameters Default value is 0.

Returns :

Returns none or a PyDictionary depending on the value of detailLevel. :

Notes

Generates an online help for available parameters and additional informations of the plugin.

getType() → returns dataIO type
Returns :dataIO type :

Notes

doctodo

getVal(buffer=dataObject|byteArray|bytes[, length=maxlength]) → returns shallow copy of internal camera image if dataObject-buffer is provided. Else values from plugin are copied to given byte or byte-array buffer.
Parameters :doctodo :
Returns :shallow copy of internal camera image :

Notes

Cameras, Grabber: - buffer (dataObject), no length value: The image in dataObject is only a shallow copy of the camera internal memory. Therefore this content

may change if a new image has been acquired by the camera. Therefore consider to make a deep copy of this image or use the method copyVal.

further IO-devices: - buffer (allocated byteArray, bytes...) and optional a length with the maximum number of characters which should be requested by the plugin. If length is not provided it is set to the length of the given buffer. Finally the number of effectively set characters is returned.

hideToolbox() → hides toolbox of the plugin
name() → returns name of plugin.
Returns :Name of the Plugin : {str}

Notes

doctodo

setAutoGrabbing(on) → Sets auto grabbing of the grabber device on or off
Parameters :

on : {bool}

  • TRUE = on
  • FALSE = off

Notes

such that live images only will be updated if a new image is manually grabbed (on).

setParam(name, value) → sets value of parameter, given by name.
Parameters :

name : {str???}

value : {str, int, double, ...}

Notes

doctodo

setVal(dataObject) → transfers given dataObject to dataIO-plugin.
Parameters :dataObject : {dataObject???}

Notes

doctodo

showConfiguration() → open configuration dialog of the plugin
showToolbox() → open toolbox of the plugin
startDevice([count=1]) → starts the given dataIO-plugin.

If you call startDevice multiple times, the device is only started at the first call, the next calls only increment a internal counter. This is necessary, since every connected live image needs to start the device without knownledge about any previous start. A call to stopDevice decrements this counter and closes the hardware device if that counter drops to 0 again. No acquisition is possible, if the device has not been started, hence the counter is 0.

Parameters :

count : {unsigned integer}, optional

default = 1

Notes

if count > 1, startDevice is executed ‘count’ times, in order to increment the grabber internal start counter.

stopDevice([count=1]) → stops the given dataIO-plugin.

Usually no acquisition is possible, if the device is not started.

Parameters :

count : {Integer > 0}, optional

default = 1 if count > 1, stopDevice is executed ‘count’ times, in order to decrement the grabber internal start counter. You can also use -1 as count argument, then stopDevice is repeated until the internal start counter is 0. The number of effective counts is then returned

Returns :

None or the number of cycles that have been necessary to finally decrement the grabber’s internal start counter to 0 (only if count==-1) :

Previous topic

itom methods

Next topic

actuator

This Page