81def get_display(preferences: Optional[List[str]] =
None) -> Optional[Display]:
83 Get a new ViSP display instance, dependending on what display driver is available.
85 :param preference: An optional list of preferred backends to use.
86 The backends are tested in the order they are specified, and the first match is instanciated.
87 If preference is None, a default list of display is used. This list contains all basic displays.
88 The specified values are case insensitive and may include. See VISP_DEFAULT_DISPLAY_PREFERENCE for the available options
90 :return: a new instance of a ViSP display if one of the requested backend has been found, None otherwise
93 final_prefs: List[str] = preferences
if preferences
is not None else VISP_DEFAULT_DISPLAY_PREFERENCE
94 for preference
in final_prefs:
95 pref_key = preference.lower()
96 display_opt = VISP_DISPLAY_CLS_MAP.get(pref_key)
97 if display_opt
is not None: