Skip to content

Support wrapping any arraylike object, which may not be a block of memory, to ImgLib2 #202

Open
@ctrueden

Description

@ctrueden

Naively, this means writing a Python-side class that implements e.g. Img or Dataset or whatever interface, providing all the methods, but backed by the Python-side arraylike object. No memory shenanigans.

But the naive approach will be extremely slow for things like iteration of samples, because each sample access is across the JNI boundary. So then we have what @hanslovsky wrote in #73:

I have wrapped a numpy-like object into a cached cell img. I don't remember what exactly the object was but as long as the individual cells can be mapped to native memory, this shouldn't be too much of a challenge. It is a different story for completely arbitrary objects, though.

Which could help with performance when we have raw memory access per cell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions