SimBA UI

simba.ui.create_project_ui module

class simba.ui.create_project_ui.ProjectCreatorPopUp[source]

Bases: PopUpMixin

Mixin for GUI pop-up windows that accept user-inputs.

extract_frames()[source]
run()[source]
update_body_part_dropdown(selected_value)[source]
update_img(selected_value)[source]

simba.ui.machine_model_settings_ui module

class simba.ui.machine_model_settings_ui.MachineModelSettingsPopUp(config_path: str)[source]

Bases: PopUpMixin, ConfigReader

Launch GUI window for specifying ML model training parameters.

change_shap_cadence_options(x)[source]
check_meta_data_integrity()[source]
clear_cache()[source]
create_class_weight_table()[source]
dropdown_switch_entry_box_state(box, dropdown)[source]
find_meta_file_cnt()[source]
get_expected_meta_dict_entry_keys()[source]
load_config()[source]
save_config()[source]
save_global()[source]

simba.ui.tkinter_functions module

simba.ui.tkinter_functions.CreateLabelFrameWithIcon(parent: Toplevel, header: str, icon_name: str, icon_link: Optional[str] = None)[source]
simba.ui.tkinter_functions.CreateToolTip(widget, text)[source]
class simba.ui.tkinter_functions.DropDownMenu(parent=None, dropdownLabel='', choice_dict=None, labelwidth='', com=None, **kw)[source]

Bases: Frame

disable()[source]
enable()[source]
getChoices()[source]
setChoices(choice)[source]
class simba.ui.tkinter_functions.Entry_Box(parent=None, fileDescription='', labelwidth='', status=None, validation=None, entry_box_width=None, **kw)[source]

Bases: Frame

destroy()[source]

Destroy this and all descendants widgets.

property entry_get
entry_set(val)[source]
set_state(setstatus)[source]
class simba.ui.tkinter_functions.FileSelect(parent=None, fileDescription='', color=None, title=None, lblwidth=None, file_types=None, dropdown: Optional[DropDownMenu] = None, initialdir: Optional[Union[str, PathLike]] = None, **kw)[source]

Bases: Frame

property file_path
setFilePath()[source]
set_state(setstatus)[source]
class simba.ui.tkinter_functions.FolderSelect(parent: Frame, folderDescription: Optional[str] = '', color: Optional[str] = None, title: Optional[str] = '', lblwidth: Optional[int] = 0, initialdir: Optional[Union[str, PathLike]] = None, **kw)[source]

Bases: Frame

property folder_path
setFolderPath()[source]
class simba.ui.tkinter_functions.ToolTip(widget)[source]

Bases: object

hidetip()[source]
showtip(text)[source]

Display text in tooltip window

class simba.ui.tkinter_functions.TwoOptionQuestionPopUp(question: str, option_one: str, option_two: str, title: str, link: Optional[str] = None)[source]

Bases: object

Helpe to create a two-option question tkinter pop up window (e.g., YES/NO).

Parameters
  • question (str) – Question to present to the user. E.g., DO YOU WANT TO PROCEED?.

  • option_one (str) – The first user option. E.g., YES.

  • option_one – The second user option. E.g., NO.

  • title (str) – The window titel in the top banner of the pop-up. E.g., A QUESTION FOR YOU!.

  • link (Optional[str]) – If not None, then a link to documentation presenting background info about the user choices.

run(selected_option)[source]
simba.ui.tkinter_functions.bindToMousewheel(event, canvas)[source]
simba.ui.tkinter_functions.callback(url)[source]
simba.ui.tkinter_functions.create_scalebar(parent: Frame, name: str, min: int, max: int, cmd: object = None)[source]
simba.ui.tkinter_functions.form_validator_is_numeric(inStr, acttyp)[source]
simba.ui.tkinter_functions.hxtScrollbar(master)[source]

Create canvas. Create a frame and put it in the canvas. Create two scrollbar and insert command of canvas x and y view Use canvas to create a window, where window = frame Bind the frame to the canvas

simba.ui.tkinter_functions.onFrameConfigure(canvas)[source]

Reset the scroll region to encompass the inner frame

simba.ui.tkinter_functions.onMousewheel(event, canvas)[source]
simba.ui.tkinter_functions.unbindToMousewheel(event, canvas)[source]

simba.ui.user_defined_pose_creator module

class simba.ui.user_defined_pose_creator.PoseConfigCreator(pose_name: str, no_animals: int, img_path: Union[str, PathLike], bp_list: List[str], animal_id_int_list: List[str])[source]

Bases: PlottingMixin

Class for creating user-defined pose-estimation pipeline in SimBA through a GUI interface.

..seealso::

GitHub tutorial/documentation.

Parameters
  • pose_name (str) – Name of the user-defined pose-estimation setting.

  • no_animals (str) – Number of animals in the user-defined pose-estimation setting.

  • img_path (str) – Path to image representation of user-defined pose-estimation setting

  • bp_list (List[str]) – Body-parts in the user-defined pose-estimation setting.

  • animal_id_int_list (List[int]) – Integers representing the animal ID which the body-parts belong to.

Examples

>>> pose_config_creator = PoseConfigCreator(pose_name="My_test_config", no_animals=2, img_path='simba/splash_050122.png', bp_list=['Ear', 'Nose', 'Left_ear', 'Ear', 'Nose', 'Left_ear'], animal_id_int_list= [1, 1, 1, 2, 2, 2])
>>> pose_config_creator.launch()
launch()[source]
save()[source]

simba.ui.video_info_ui module

class simba.ui.video_info_ui.VideoInfoTable(config_path: str)[source]

Bases: ConfigReader, PopUpMixin

Create GUI that allows users to modify resolutions, fps, and pixels-per-mm interactively of videos within the SimBA project. Data is stored within the project_folder/logs/video_info.csv file in the SimBA project.

Parameters

config_file_path (str) – path to SimBA project config file in Configparser format

..seealso::

Tutorial.

Example

>>> video_info_gui = VideoInfoTable(config_path='MyProjectConfig')
>>> video_info_gui.create_window()
>>> video_info_gui.main_frm.mainloop()
create_window()[source]

Module contents