ImageDev Python
This section details how to start with ImageDev Python.
Prerequisites
ImageDev requires a 64-bit Python distribution.- On Windows: Python 3.7 or 3.8.
- On Linux: Python 3.8.
Installation
To use ImageDev Python from an available package archive, you need to:- Download the ImageDevPython and ImageDevExamplesPython package archives.
- Unzip these archives in a folder.
- Open a terminal window and execute the following command lines:
pip install path_to_unzipped_ImageDev/pip/iolink_wheel_name.whl pip install path_to_unzipped_ImageDev/pip/imagedev_wheel_name.whlWhere:
- path_to_unzipped_ImageDev is the path to the unzipped ImageDevPython folder
- iolink_wheel_name is the name of the wheel file for the IOLink package
- imagedev_wheel_name is the name of the wheel file for the ImageDev package
pip install path_to_unzipped_ImageDevExamples/pip/ioformat_wheel_name.whlWhere:
- path_to_unzipped_ImageDevExamples is the path to the unzipped ImageDevExamplesPython folder
- ioformat_wheel_name is the name of the wheel file for the IOFormat package
Hello ImageDev Python
In order to run examples, you must install the imagedev data package.Open a terminal window and type:
pip install path_to_unzipped_ImageDevExamples/pip/imagedev_data_wheel_name.whlWhere:
- path_to_unzipped_ImageDevDExample is the path to the unzipped ImageDevExamplesPython folder
- imagedev_data_wheel_name is the name of the wheel file for the ImageDev-Data package
data_repository() # Return the full path of the folder containing the data of the package get_image_path(image_relative_path) # Return the full path of an image of the package get_object_path(object_relative_path) # Return the full path of an object of the packageYou are now ready to write your first ImageDev code with your favorite IDE or directly in a Python console. For instance, by copying and pasting the content of the Python example available at the end of the HelloImageDev tutorial page.
You can now run this code and compare the resulting images with those shown in the HelloImageDev tutorial.