Read and write native DaVis images and vectors filetypes VC7 and IM7
Project description
Overview
ReadIM is a c++ wrapper to load DaVis Images and Vectors created by DaVis V8. ReadIM is a ‘low level’ wrapper of C++ libraries provided by LaVision GMBH. ReadIMX source was latest updated by LaVision in Aug-2014.
Installation
This module must be compiled to work correctly. If there isn’t a binary on pip you’ll need to have the appropriate build tools installed to compile it.
>>> pip install ReadIM
If this fails you will need to compile yourself. Ensure you have the necessary build tools. Clone the source and run the following.
>>> python setup.py build install
Usage
To load a .vc7 file run:
>>> buffer, atts = ReadIM.extra.get_Buffer_andAttributeList('filename.vc7') >>> v_array, _ = ReadIM.extra.buffer_as_array(vbuff) >>> ReadIM.DestroyBuffer(buffer) >>> ReadIM.DestroyAttributeListSafe(atts)
similarly for a .im7 file run:
>>> buffer, atts = ReadIM.extra.get_Buffer_andAttributeList('filename.im7') >>> im_array, _ = ReadIM.extra.buffer_as_array(vbuff) >>> ReadIM.DestroyBuffer(buffer) >>> ReadIM.DestroyAttributeListSafe(atts)
Writing files
(requires existing buffer and atts first) >>> atts = ReadIM.load_AttributeList({‘attribute’:’value’}) >>> ReadIM.WriteIM7(‘saved_file.im7’, True, buffer, atts.next)
Mermory leaks
Memory cleanup of the buffer and attribute list is not automatic. Both the buffer and attribute list must be destroyed manually. Once they are destroyed no attempt should be made to access the corresponding memory -doing so will crash the program.
>>> ReadIM.DestroyBuffer(buffer) >>> ReadIM.DestroyAttributeListSafe(atts)
VC7 files
Depending on the filetype, there could be several frames that make up the optimal vecrtor field as decided by DaVis. For a full description of the buffer you can contact LaVision support. Below is a link for some code snippets.
see the function “_get_vectors” at https://bitbucket.org/fleming79/im/src/master/IM/core.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ReadIM-0.8.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bd46c0be53cb54d6e573ec855a491ba3b39bd13e531955719e18e2d0b154e49 |
|
MD5 | b5557acb8ffbb44537cb4bee0090fe4a |
|
BLAKE2b-256 | 305583981c98fb7d07fda3b04c8859d468d3a90b8448f6654bb4e294d04bfffc |
Hashes for ReadIM-0.8.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b404c454742a080eb64115371c09dfb3e8a77a1a5bd1d5bee6514f7ef8ae713 |
|
MD5 | 513589bac43c9ac0dcdbd7cbefe94076 |
|
BLAKE2b-256 | 65fa8a27701bfc45288a343740ddf08baabb4a7145017a97b9a198a07dde6834 |
Hashes for ReadIM-0.8.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fecd40109f56925fd97ffd2be33737aded78ce94b1ee5e1d55c49421a729ad9 |
|
MD5 | 0cffa5b0c94215b020c014a648cb009e |
|
BLAKE2b-256 | 58af05f5fb1ef3548c072207c4ca7ea8c0d1dfd80e51bfeefc87f106e15dfd4d |
Hashes for ReadIM-0.8.3-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cebe3296e4165e7eeee53fd33b582141afb4d2cce9d01fb77a315e7115daa255 |
|
MD5 | e071ad6a9705db64b60b51028765595f |
|
BLAKE2b-256 | 41964469da7b272fd26e91a32701a84e77c812d936c579b4e63c3931ae830c9f |