stream
#
Module: stream.client
#
|
This obj is responsible to create a StreamClient. |
|
This obj. |
|
This callback is used to update the image inside of the ImageManager instance |
|
This callback is used to invoke vtk interaction events reading those events from the provided circular_queue instance |
Module: stream.constants
#
Module: stream.server
#
Module: stream.server.async_app
#
set() -> new empty set object set(iterable) -> new set object |
|
|
|
|
|
|
3 | LeftButtonPressEvent 4 | LeftButtonReleaseEvent 5 | MiddleButtonPressEvent 6 | MiddleButtonReleaseEvent 7 | RightButtonPressEvent 8 | RightButtonReleaseEvent |
|
Module: stream.server.main
#
|
This Obj it's responsible to create the VideoStream for the WebRTCServer |
|
This will create a streaming webserver running on the given port and host using RawArrays. |
|
This will create a streaming webserver running on the given port and host using SharedMemory. |
Module: stream.tools
#
|
This implements a abstract (generic) multidimensional buffer. |
|
This implements a multidimensional buffer with RawArray. |
|
This implements a generic multidimensional buffer with SharedMemory. |
|
This implements a generic circular queue which works with shared memory resources. |
|
This implements a MultiDimensional Queue which works with Arrays and RawArrays. |
|
This implements a MultiDimensional Queue which works with SharedMemory. |
|
This implements a abstract (generic) ImageBufferManager with the n-buffer technique. |
|
This implements an ImageBufferManager using RawArrays. |
|
This implements an ImageBufferManager using the SharedMemory approach. |
|
Implements a object with the same behavior of setInterval from Js |
|
A object that creates a timer that calls a function periodically. |
Monkey-patch multiprocessing.resource_tracker so SharedMemory won't be tracked |
Module: stream.widget
#
|
This Obj it's able execute the fury streaming system using the SharedMemory object from Python multiprocessing. |
|
Check if a given port it's available |
FuryStreamClient
#
- class fury.stream.client.FuryStreamClient(showm, *, max_window_size=None, use_raw_array=True, whithout_iren_start=False, num_buffers=2)[source]#
Bases:
object
This obj is responsible to create a StreamClient.
- start(*, ms=0, use_asyncio=False)[source]#
Start the stream client.
- Parameters:
- msfloat, optional
positive number. This update the image buffer using a interval of ms milliseconds. If ms is 0 then the stream client will update the buffer after every Render event.
- use_asynciobool, optional
If False then the stream client will update the image using a threading technique.
FuryStreamInteraction
#
- class fury.stream.client.FuryStreamInteraction(showm, *, max_queue_size=50, use_raw_array=True, whithout_iren_start=False)[source]#
Bases:
object
This obj. is responsible to manage the user interaction
callback_stream_client#
interaction_callback#
- fury.stream.client.interaction_callback(circular_queue, showm, iren, render_after)[source]#
This callback is used to invoke vtk interaction events reading those events from the provided circular_queue instance
- Parameters:
- circular_queueCircularQueue
- showmShowmManager
- irenvtkInteractor
- render_afterbool, optional
If the render method should be called after an dequeue
_CQUEUE_EVENT_IDs#
- fury.stream.constants._CQUEUE_EVENT_IDs#
_CQUEUE_INDEX_INFO#
- fury.stream.constants._CQUEUE_INDEX_INFO#
_CQUEUE#
- fury.stream.constants._CQUEUE#
pcs#
- fury.stream.server.async_app.pcs#
set() -> new empty set object set(iterable) -> new set object
Build an unordered collection of unique elements.
set_weel#
set_mouse#
set_mouse_click#
get_app#
RTCServer
#
- class fury.stream.server.main.RTCServer(image_buffer_manager)[source]#
Bases:
object
This Obj it’s responsible to create the VideoStream for the WebRTCServer
web_server_raw_array#
- fury.stream.server.main.web_server_raw_array(*, image_buffers=None, info_buffer=None, queue_head_tail_buffer=None, queue_buffer=None, port=8000, host='localhost', provides_mjpeg=True, provides_webrtc=True, ms_jpeg=16, run_app=True)[source]#
This will create a streaming webserver running on the given port and host using RawArrays.
- Parameters:
- image_bufferslist of buffers
A list of buffers with each one containing a frame.
- info_bufferbuffer
A buffer with the information about the current frame to be streamed and the respective sizes
- queue_head_tail_bufferbuffer
If buffer is passed than this Obj will read a a already created RawArray.
- queue_bufferbuffer
If queue_buffer is passed than this Obj will read a a already created RawArray containing the user interactions events stored in the queue_buffer.
- portint, optional
Port to be used by the aiohttp server
- hoststr, optional, default localhost
host to be used by the aiohttp server
- provides_mjpegbool, default True
If a MJPEG streaming should be available. If True you can consume that through host:port/video/mjpeg or if you want to interact you can consume that through your browser http://host:port?encoding=mjpeg
- provides_webrtcbool, default True
If a WebRTC streaming should be available. http://host:port
- ms_jpegfloat, optional
This it’s used only if the MJPEG will be used. The ms_jpeg represents the amount of milliseconds between to consecutive calls of the jpeg encoding.
- run_appbool, default True
This will run the aiohttp application. The False condition is used just to be able to test the server.
web_server#
- fury.stream.server.main.web_server(*, image_buffer_names=None, info_buffer_name=None, queue_head_tail_buffer_name=None, queue_buffer_name=None, port=8000, host='localhost', provides_mjpeg=True, provides_webrtc=True, avoid_unlink_shared_mem=True, ms_jpeg=16, run_app=True)[source]#
This will create a streaming webserver running on the given port and host using SharedMemory.
- Parameters:
- image_buffers_namelist of str
A list of buffers with each one containing a frame.
- info_buffer_namestr
A buffer with the information about the current frame to be streamed and the respective sizes
- queue_head_tail_buffer_namestr, optional
If buffer is passed than this Obj will read a a already created RawArray.
- buffer_namestr, optional
If queue_buffer is passed than this Obj will read a a already created RawArray containing the user interactions events stored in the queue_buffer.
- portint, optional
Port to be used by the aiohttp server
- hoststr, optional, default localhost
host to be used by the aiohttp server
- provides_mjpegbool, default True
If a MJPEG streaming should be available. If True you can consume that through host:port/video/mjpeg or if you want to interact you can consume that through your browser http://host:port?encoding=mjpeg
- provides_webrtcbool, default True
If a WebRTC streaming should be available. http://host:port
- avoid_unlink_shared_membool, default False
If True, then this will apply a monkey-patch solution to a python>=3.8 core bug
- ms_jpegfloat, optional
This it’s used only if the MJPEG will be used. The ms_jpeg represents the amount of milliseconds between to consecutive calls of the jpeg encoding.
- run_appbool, default True
This will run the aiohttp application. The False condition is used just to be able to test the server.
GenericMultiDimensionalBuffer
#
RawArrayMultiDimensionalBuffer
#
GenericCircularQueue
#
ArrayCircularQueue
#
- class fury.stream.tools.ArrayCircularQueue(*, max_size=10, dimension=6, head_tail_buffer=None, buffer=None)[source]#
Bases:
GenericCircularQueue
This implements a MultiDimensional Queue which works with Arrays and RawArrays.
GenericImageBufferManager
#
RawArrayImageBufferManager
#
- class fury.stream.tools.RawArrayImageBufferManager(*, max_window_size=(100, 100), num_buffers=2, image_buffers=None, info_buffer=None)[source]#
Bases:
GenericImageBufferManager
This implements an ImageBufferManager using RawArrays.
IntervalTimerThreading
#
IntervalTimer
#
remove_shm_from_resource_tracker#
- fury.stream.tools.remove_shm_from_resource_tracker()[source]#
Monkey-patch multiprocessing.resource_tracker so SharedMemory won’t be tracked
Notes
More details at: https://bugs.python.org/issue38119
Widget
#
- class fury.stream.widget.Widget(showm, *, ms_stream=33, ms_interaction=33, host='localhost', port=None, encoding='mjpeg', ms_jpeg=33, queue_size=20)[source]#
Bases:
object
This Obj it’s able execute the fury streaming system using the SharedMemory object from Python multiprocessing.
- property command_string#
Return the command string to start the server
- Returns:
- command_stringstr
- start(*, use_asyncio=False)[source]#
Start the fury client and the interaction client and return the url
- Parameters:
- use_asynciobool, optional
If should use the asyncio version of the server. Default is False.
- property url#
Return the url to access the server