Skip to main content

Overview

ReadIM is a C++ wrapper to load DaVis Images and Vectors and is a 'low level' wrapper of C++ libraries provided by LaVision GMBH. ReadIMX source was latest updated by LaVision in Aug-2014.

A higher level module: "IM" exists to work with images and vectors. It isn't hosted on PyPi however it can still be installed with pip. It provides more convenient file read / write capability and is the recommended starting point to read and write IM7/VC7 files.

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 for it to compile and install properly.

pip install ReadIM

Usage

To load a .vc7 file run

import ReadIM
filename = ReadIM.extra.get_sample_vector_filenames()[0]
buffer, atts   =  ReadIM.extra.get_Buffer_andAttributeList(filename)
v_array, _ = ReadIM.extra.buffer_as_array(buffer)
v_array.shape
del(v_array)    # Required
ReadIM.DestroyBuffer(buffer)
ReadIM.DestroyAttributeListSafe(atts)

similarly for a .im7 file run

import ReadIM
filename = ReadIM.extra.get_sample_image_filenames()[0]
buffer, atts   =  ReadIM.extra.get_Buffer_andAttributeList(filename)
im_array, _ = ReadIM.extra.buffer_as_array(buffer)
im_array.shape
del(im_array)   # Required
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)

Memory leaks

Memory cleanup of the buffer and attribute list is not automatic. Both the buffer and attribute list must be destroyed manually. All references to the buffer and attributes should be removed before attempting to destroy the memory, failing to do so will crash python.

del(im_array)
ReadIM.DestroyBuffer(buffer)
ReadIM.DestroyAttributeListSafe(atts)

VC7 files

Depending on the filetype, there could be several frames that make up the optimal vector field as decided by DaVis. For a full description of the buffer you should contact LaVision support. Below is a link for some code snippets. The higher level "IM" automatically reads the optimal result.

see the function "_get_vectors" at https://bitbucket.org/fleming79/im/src/master/IM/core.py

Metadata

Release files for ReadIM 0.8.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ReadIM 0.8.4
File Size Uploaded
ReadIM-0.8.4.tar.gz 8.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ReadIM 0.8.4
File Interpreter ABI Platform
ReadIM-0.8.4-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details

Total release size: 16.3 MB

Release files / ReadIM-0.8.4.tar.gz

Download URL ReadIM-0.8.4.tar.gz
Size 8.1 MB
Tags Source
SHA-256 checksum
How to use checksums
105713a31cccf1e339e5bbd03b55053ab672d8a67c3827d18fde41c9ecc8efdb
BLAKE2b-256 checksum
How to use checksums
78e557b41ec1f4ed7ac96d2cb184bd7c0678167cb7948af6abb4ec769d3d525c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.6

Release files / ReadIM-0.8.4-cp37-cp37m-win_amd64.whl

Download URL ReadIM-0.8.4-cp37-cp37m-win_amd64.whl
Size 8.2 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
8dd7c1e60107381b9de87dff6ba1a354b65f5615d6fb01655d2f1b3c2ea0acea
BLAKE2b-256 checksum
How to use checksums
71ce6aaec446efdb6d3fa49c869ea5318031bc907e754b9c18e6c260d9cea09e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.8.4 This release

2 release files

0.8.3

5 release files

0.8.2

2 release files

0.7.2

3 release files

0.7.1

5 release files

0.7.0

2 release files

0.6.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page