AllenNeuralDynamics / AllenNeuralDynamics/exa-spim-control

Remove dangling image copy operation

Aperta
#17 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
2
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The eGrabber api showcases an example where you can write to an existing buffer. Pasted below.
````python
"""Grab into user allocated buffer. sample240.py"""

from egrabber import *

gentl = EGenTL()
grabber = EGrabber(gentl)
payload_size = grabber.get_payload_size()
user_buffer = bytearray(payload_size)
grabber.announce_and_queue(UserMemory(user_buffer))
grabber.start(1)
with Buffer(grabber) as buffer:
base = buffer.get_info(BUFFER_INFO_BASE, INFO_DATATYPE_PTR)
data_size = buffer.get_info(BUFFER_INFO_DATA_SIZE, INFO_DATATYPE_SIZET)
print('User memory address: {}, buffer data size: {}'.format(base, data_size))
grabber.stop()
grabber.realloc_buffers(0)
````

It would be a huge win to be able to write this into the shared memory double buffer so that the image would never have to be copied.

Note: that this is only practical if we
1. do not need to do any point-operations before sending the image to ImarisWriter. (i.e: transposing the image.)
2. do not need to use a copy of the image anywhere else. (This could be tricky with MIPs, but still doable.)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.