Creating a new image in a custom module

8 views
Skip to first unread message

Bene

unread,
Mar 18, 2020, 5:40:38 PM3/18/20
to bisque bioimage
Hi,

I'm currently investigating how to implement a custom module (using Python). I looked at the source code of available modules and got some idea how it works in principle. One thing however is still not clear to me.

The output of my module would be a video, and I wonder how to best display it. I guess I have to create a new image for that, and I briefly tried to do so using BQFactory.create("image") (which I found at https://biodev.ece.ucsb.edu/projects/bisque/wiki/Developer/BisqueApi), but obviously this function does not exist (any more?), at least not in Python.

Is there another way to achieve this? Is it necessary at all to create an image? Or could the result be served from e.g. an mp4 file? But then how would I specify this in my module xml, so that it gets rendered correctly.

Thanks for any hints and best wishes,

Bene


Bene

unread,
Mar 19, 2020, 6:20:37 AM3/19/20
to bisque bioimage
I just found the answer myself. For documentation purposes, here is what seemds to work:


r = save_blob(session, '/bla.mp4')
uri = r.get('uri')

tags = [{
    'name': 'outputs',
    'tag' : [{
        'name': 'MyVideo',
        'type': 'image',
        'value': uri
    }]
}]

Reply all
Reply to author
Forward
0 new messages