gingerbread.realtime package#
Submodules#
gingerbread.realtime.realtime module#
- class gingerbread.realtime.realtime.RealTimeModule#
Bases:
CentralProcessingHandler
- call_process(series_uid_list: List[str], back2pacs: bool = False, project_series_uid: str | None = None) NoReturn #
call_process will commence prediction process and return the output
- get_img_and_spacing(series_uid: str) ndarray #
get_img_and_spacing will get the image and spacing from the database
- Parameters:
series_uid (str) – series_uid is the unique identifier of the image
- Returns:
img – img is the image
- Return type:
np.ndarray
- mrsl_convert(uid: str, pmask_uids: List[str], series_uids: List[str], version_uids: List[str]) NoReturn #
__check_prod_and_send will check the production server type and send the message to the queue if the server is pacs :param uid: uid to convert :type uid: str :param pmask_uids: list of pmask_uids to convert :type pmask_uids: List[str] :param series_uids: list of series_uids to convert :type series_uids: List[str] :param version_uids: list of version_uids to convert :type version_uids: List[str]
- Return type:
NoReturn
- send_to_analytics(message: Dict[str, Any]) NoReturn #
gingerbread.realtime.realtime_trigger module#
- gingerbread.realtime.realtime_trigger.callback(method_frame: Deliver, properties: BasicProperties, body: str) bool #
callback is a function that is triggered on an event message coming from Mrsal. The function trigges the SpottyRealTime class that runs the predictions process for the internal system in NeoMedSys. Results are placed into MedQuery and displayed to clients throught the UI.
- Parameters:
body (str) – body contains a JSON serialized dictionary containing a message and a list of SeriesUIDs
- gingerbread.realtime.realtime_trigger.run() None #