Python-Module itom

The module itom is a python module, that builds the connecting part between the embedded python script language and the overall itom application. This module is only available in the context of a running itom software.

Import itom

Like any other python module, you need to import the module itom in your script. Usually, the import is done at the beginning of a script. In the following example, it is shown how the method filterHelp of the module itom can be called with respect to different ways of import itom:

#1. import the whole module. Any method is then directly accessible
from itom import *

#2. import the itom module without the global access to its methods
import itom

#3. only import certain methods or classes of the module itom
from itom import filterHelp as anyAlias

If you simply type any commands in the itom command line or if you directly execute any script at the top level, you don’t need import the module itom, since this module already has been imported at startup of itom with

from itom import *

However, if you import another script file in your main script file and you want to access any methods of itom in this secondary script, then you need to import itom in this script using one of the methods shown above.

Content of itom

  • class dataObject. This is the itom internal matrix class, compatible to Numpy, and also used by any connected grabber or camera. Every matrix is extended by fixed and user-defined tags and keywords. For an introduction to the data object, see DataObject, a full reference is available under dataObject. The data object is compatible to any numpy array, however the tags and keywords will get lost.

  • class npDataObject. This class is inherited from numpy.array and extends it by the tags and keywords, also available in the data object. For more information see npDataObject or the script reference npDataObject.

  • classes ui and uiItem are the main classes for creating user defined dialogs and windows in itom and show them using some lines of script code. For more information about their use, see Creating advanced dialogs and windows or their definitions in the script reference ui and uiItem.

  • class dataIO is the class in order to access any plugin instance of type dataIO (cameras, grabbers, AD-converter...). The full reference can be found under dataIO.

  • class actuator is the class in order to access any plugin instance of type actuator, like motor stages... The full reference can be found under actuator.

  • other class free methods. itom also directly contains a lot of methods, that makes features of itom accessible by a Python script. By these methods you can
    • add or remove buttons or items to the itom menu and toolbar (see Customize the menu and toolbars of itom)
    • get help about plugins and their functionality
    • call any algorithm or filter, provided by a plugin of type algo
    • directly plot matrices like dataObjects.