1.13. FileGrabber
Summary: |
A virtual grabber |
Type: |
DataIO |
License: |
Licensed under LPGL. |
Platforms: |
Windows, Linux |
Devices: |
Virtual file camera (grabbing from image files) |
Author: |
W. Lyda, ITO, University Stuttgart |
1.13.1. Overview
This plugin emulates a camera by grabbing images from files in a specific folder on the hard disk. Alternatively, it is possible to iteratively load images from a 3D-data object (stack). The first possibility uses the command imread from OpenCV (OpenCV library highgui required).
The grabber can work in 3 different modes: 1) Files in a specified folder are sequentially loaded each time a getVal / copyVal is performed. At the moment only 8 and 16 bit images are supported. 2) Images are sequentially loaded from a 3D data object (stack of images). Each getVal / copyVal returns a reference/copy to the specific plane of the stack. Supports 8, 12, 14, 16, 24-bit. 3) Files in a specified folder are scanned and preloaded to an image stack. Each getVal / copyVal returns a reference/copy to the specific plane of the stack. Supports 8, 12, 14, 16, 24-bit.
In the second case, provide the objectStack argument, arguments bpp and sourceFolder are ignored. bpp is generated by the type and value range of the objectStack.
1.13.2. Initialization
The following parameters are mandatory or optional for initializing an instance of this plugin:
- fileFilter: str
File-Type, e.g. ‘tif’, ‘png’
default: “tif”
- sourceFolder: str
Absolute path of the source images
default: “”
- bpp: int
Destination bit depth. 0: Auto or 8, 12, 14, 16, 24
Value range: [0, 24], Default: 8
- preloadImages: int
If 0, no preloading is active, else the first n image are loaded to a stack.
Value range: [0, 1000], Default: 0
- objectStack: itom.dataObject, optional
If not NULL and preloading is active, an 3D-Object can to used for the grabber.
1.13.3. Parameters
An instance of this plugin has the following internal parameters:
- binning: {int}, read-only
Binning of different pixel
- bpp: {int}, read-only
Grabdepth of the images
- current_image: {int}
The current shown image
- frame_time: {float}, read-only
Time between two frames
- gain: {float}, read-only
Virtual gain
- integration_time: {float}
Integrationtime of CCD programmed in s
- name: {str}
GrabberName
- number_of_images: {int}, read-only
The maximal number if images
- offset: {float}, read-only
Virtual offset
- sizex: {int}, read-only
Pixelsize in x (cols)
- sizey: {int}, read-only
Pixelsize in y (rows)
- time_out: {float}, read-only
Timeout for acquiring images
- x0: {int}, read-only
Pixelsize in x (cols)
- x1: {int}, read-only
Pixelsize in x (cols)
- y0: {int}, read-only
Pixelsize in y (rows)
- y1: {int}, read-only
Pixelsize in y (rows)