Skip to main content

The official Python Binding for the GenICam GenApi & the GenTL Producers

Project description

The genicam module is the official Python binding of GenICam that is developed and maintained by the GenICam committee.

GenICam

About the genicam module

The genicam module consists of two sub-modules. The one is genapi and the other is gentl. The genapi module gives you a way to control GenICam features of the target device supports. On the other hand, the gentl module gives you a way to control functionality that the target GenTL Producer supports.

Using the genicam module

The genapi module

In this section, you will learn how to use the genapi module.

Creating a node map object

First, you create a node map object instantiating the NodeMap class:

from genicam.genapi import NodeMap

node_map = NodeMap()

And then, load a device description file on the node map object. The NodeMap object supports several ways to make it. One is to load the file content as a str object:

file_content = 'blabla'
node_map.load_xml_from_string(file_content)

Another way is to load the file as an XML file:

file = an_xml_file
node_map.load_xml_from_file(file)

The other ways is to load the file as a Zip file:

file = a_zip_file
node_map.load_xml_from_zip_file(file)

Changing a feature value

Once you loaded a device description file on a node map object, you would start to control GenICam feature nodes to control the target device. Now assume that we are going to control a GenICam feature node called Foo. To get the value of Foo, we code as follows:

a = node_map.Foo.value

On the other hand, if Foo is an Integer node then we code as follows to set a value:

node_map.Foo.value = 42

If Foo is a Boolean node, then you code as follows:

node_map.Foo.value = True

Or if Foo is an Enumeration node, then you code as follows; it also works for a case where Foo is a String node:

node_map.Foo.value = 'Bar'

If Foo is a Command node, then you can execute the command with the following code:

node_map.Foo.execute()

The gentl module

In this section, you will learn how to use the gentl module.

[TO BE DOCUMENTED]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

genicam-1.3.0-cp311-cp311-win_amd64.whl (2.1 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

genicam-1.3.0-cp311-cp311-manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.11

genicam-1.3.0-cp311-cp311-manylinux2014_aarch64.whl (2.9 MB view hashes)

Uploaded CPython 3.11

genicam-1.3.0-cp311-cp311-macosx_12_0_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.11 macOS 12.0+ x86-64

genicam-1.3.0-cp310-cp310-win_amd64.whl (2.1 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

genicam-1.3.0-cp310-cp310-manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.10

genicam-1.3.0-cp310-cp310-manylinux2014_aarch64.whl (2.9 MB view hashes)

Uploaded CPython 3.10

genicam-1.3.0-cp310-cp310-macosx_12_0_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.10 macOS 12.0+ x86-64

genicam-1.3.0-cp39-cp39-win_amd64.whl (2.1 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

genicam-1.3.0-cp39-cp39-manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.9

genicam-1.3.0-cp39-cp39-manylinux2014_aarch64.whl (2.9 MB view hashes)

Uploaded CPython 3.9

genicam-1.3.0-cp39-cp39-macosx_12_0_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.9 macOS 12.0+ x86-64

genicam-1.3.0-cp38-cp38-win_amd64.whl (2.1 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

genicam-1.3.0-cp38-cp38-manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.8

genicam-1.3.0-cp38-cp38-manylinux2014_aarch64.whl (2.9 MB view hashes)

Uploaded CPython 3.8

genicam-1.3.0-cp38-cp38-macosx_12_0_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.8 macOS 12.0+ x86-64

genicam-1.3.0-cp37-cp37m-win_amd64.whl (2.1 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

genicam-1.3.0-cp37-cp37m-manylinux2014_x86_64.whl (3.1 MB view hashes)

Uploaded CPython 3.7m

genicam-1.3.0-cp37-cp37m-manylinux2014_aarch64.whl (2.9 MB view hashes)

Uploaded CPython 3.7m

genicam-1.3.0-cp37-cp37m-macosx_12_0_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.7m macOS 12.0+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page