Skip to main content

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 DaVis V8. ReadIM is a ‘low level’ interface to C++ libraries provided by LaVision GMBH.

Installation

This module is compiled. If there isn’t a binary you’ll need to have the appropriate build tools installed.

>>> pip install ReadIM

If this fails you will need to compile yourself. Clone the source and run the following.

>>> python setup.py build install
>>> python setup.py test

If the test passes then all should be okay.

Usage

To load a .vc7 file run:

>>> vbuff, vatts   =  ReadIM.extra.get_Buffer_andAttributeList('filename.vc7')
>>> v_array, vbuff = ReadIM.extra.buffer_as_array(vbuff)

similarly for a .im7 file run:

>>> vbuff, vatts   =  ReadIM.extra.get_Buffer_andAttributeList('filename.im7')
>>> v_array, vbuff = ReadIM.extra.buffer_as_array(vbuff)

Writing files

>>> atts = ReadIM.load_AttributeList({'attribute':'value'})
>>> ReadIM.WriteIM7('saved_file.im7', True, buff, atts.next)

Finally, memory cleanup is not automatic. To prevent memory leaks do the following:

>>> del(vbuff)
>>> ReadIM.DestroyBuffer(buff)
>>> ReadIM.DestroyAttributeListSafe(atts)

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

ReadIM-0.8.2.tar.gz (132.1 kB view hashes)

Uploaded Source

Built Distribution

ReadIM-0.8.2-cp37-cp37m-win_amd64.whl (210.7 kB view hashes)

Uploaded CPython 3.7m Windows 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