facebook360_dep
Facebook360 Depth Estimation Pipeline
Public Member Functions | Public Attributes | List of all members
background.Background Class Reference

Public Member Functions

def __init__ (self, parent)
 
def add_data_type_validators (self)
 
def initialize_paths (self)
 
def update_noise_detail (self, noise, detail)
 
def switch_ui_elements_for_processing (self, state)
 
def sync_with_s3 (self)
 
def update_frame_names (self)
 
def on_process_finished (self, exitCode, exitStatus, p_id)
 
def setup_logs (self)
 
def set_default_top_level_paths (self, mkdirs=False)
 
def update_thresholds_color_variance (self)
 
def run_thresholds_after_wait (self, type)
 
def save_flag_file (self)
 
def retrieve_missing_flagfiles (self)
 
def add_default_flags (self)
 
def update_flagfile_edit (self, flagfile_fn, switch_to_flag_tab=True)
 
def get_files (self, tag)
 
def update_buttons (self, gb)
 
def refresh_data (self)
 
def setup_project (self, mkdirs=False, run_thresholds=True)
 
def refresh (self)
 
def update_thresholds (self, type)
 
def on_changed_slider (self, slider, value)
 
def run_thresholds (self, type)
 
def run_process (self)
 
def cancel_process (self)
 
def on_changed_flagfile_edit (self)
 
def get_logs (self)
 
def setup_flags (self)
 
def update_flags_from_data (self, flags)
 
def update_data_from_flags (self, flags)
 
def update_data_or_flags (self, flagfile_fn, flagfile_from_data, switch_to_flag_tab=False)
 
def update_flagfile (self, flagfile_fn)
 
def on_changed_dropdown (self, gb, dd)
 
def on_changed_line_edit (self, gb, le)
 
def on_state_changed_partial_360 (self)
 
def on_state_changed_recompute (self)
 
def on_changed_preview (self)
 
def populate_dropdowns (self, gb)
 
def setup_data (self)
 
def setup_thresholds (self)
 
def setup_thresholds_color_variance (self)
 
def disable_tab_if_no_data (self)
 

Public Attributes

 parent
 
 tag
 
 dlg
 
 log_reader
 
 output_dirs
 

Detailed Description

Tab in UI responsible for computing depth estimates on the background frame.

Attributes:
    dlg (App(QDialog)): Main dialog box for the app initialized by QT.
    log_reader (LogReader(QtCore.QObject)): Object to interact with UI logging system.
    output_dirs (list[str]): List of directories where outputs will be saved.
    parent (App(QDialog)): Object corresponding to the parent UI element.
    path_rig_json (str): Path to the rig JSON.
    tag (str): Semantic name for the tab.

Constructor & Destructor Documentation

◆ __init__()

def background.Background.__init__ (   self,
  parent 
)
Initializes the Background tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

Member Function Documentation

◆ add_data_type_validators()

def background.Background.add_data_type_validators (   self)
Adds validators for UI elements.

◆ add_default_flags()

def background.Background.add_default_flags (   self)
Retrieves the default flags to the local flagfile.

◆ cancel_process()

def background.Background.cancel_process (   self)
Stops a running process.

◆ disable_tab_if_no_data()

def background.Background.disable_tab_if_no_data (   self)
Prevents navigation to the tab if the required data is not present.

◆ get_files()

def background.Background.get_files (   self,
  tag 
)
Retrieves file names corresponding to the desired attribute.

Args:
    tag (str): Semantic name for the attribute.

Returns:
    list[str]: List of file names.

Raises:
    Exception: If a tag is requested with no associated files.

◆ get_logs()

def background.Background.get_logs (   self)

◆ initialize_paths()

def background.Background.initialize_paths (   self)
Initializes paths for scripts and flags.

◆ on_changed_dropdown()

def background.Background.on_changed_dropdown (   self,
  gb,
  dd 
)
Callback event handler for changed dropdown.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.
    dd (QtWidgets.QComboBox): Dropdown UI element.

◆ on_changed_flagfile_edit()

def background.Background.on_changed_flagfile_edit (   self)
Callback event handler for flagfile edits.

◆ on_changed_line_edit()

def background.Background.on_changed_line_edit (   self,
  gb,
  le 
)
Callback event handler for changed line edit.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.
    le (QtWidgets.QLineEdit): Line edit UI element.

◆ on_changed_preview()

def background.Background.on_changed_preview (   self)
Callback event handler for changed image previews.

◆ on_changed_slider()

def background.Background.on_changed_slider (   self,
  slider,
  value 
)
Callback event handler for changes to a slider UI element.

Args:
    slider (QtWidgets.QSlider): Slider UI element.
    value (int/float): Value of the slider element.

◆ on_process_finished()

def background.Background.on_process_finished (   self,
  exitCode,
  exitStatus,
  p_id 
)
Callback event handler for a process completing.

Args:
    exitCode (int): Return code from running the process.
    exitStatus (str): Description message of process exit.
    p_id (str): PID of completed process.

◆ on_state_changed_partial_360()

def background.Background.on_state_changed_partial_360 (   self)
Callback event handler for changed "partial coverage" checkbox.

◆ on_state_changed_recompute()

def background.Background.on_state_changed_recompute (   self)
Callback event handler for changed "recompute" checkbox.

◆ populate_dropdowns()

def background.Background.populate_dropdowns (   self,
  gb 
)
Populates the dropdowns in the tab.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ refresh()

def background.Background.refresh (   self)
Resets the UI tab to its start state.

◆ refresh_data()

def background.Background.refresh_data (   self)
Updates UI elements to be in sync with data on disk.

◆ retrieve_missing_flagfiles()

def background.Background.retrieve_missing_flagfiles (   self)
Copies the missing flagfiles to project for local modification.

◆ run_process()

def background.Background.run_process (   self)
Runs the default binary associated with the tab.

◆ run_thresholds()

def background.Background.run_thresholds (   self,
  type 
)
Runs thresholding based on values in the UI and update UI display.

Args:
    type (str): Type of threshold to run (either "color_variance" or "fg_mask").

◆ run_thresholds_after_wait()

def background.Background.run_thresholds_after_wait (   self,
  type 
)
Computes the threshold and displays after a delay.

Args:
    type (str): Type of threshold to run (either "color_variance" or "fg_mask").

◆ save_flag_file()

def background.Background.save_flag_file (   self)
Saves flagfile from the UI to disk.

◆ set_default_top_level_paths()

def background.Background.set_default_top_level_paths (   self,
  mkdirs = False 
)
Defines class referenceable attributes for paths. See common for full set
of definitions.

Args:
    mkdirs (bool, optional): Whether or not to make the defined directories.

◆ setup_data()

def background.Background.setup_data (   self)
Sets up callbacks and initial UI element statuses.

◆ setup_flags()

def background.Background.setup_flags (   self)
Sets up the flags according to the corresponding flagfile.

◆ setup_logs()

def background.Background.setup_logs (   self)
Sets up logging system for dialog on the current tab.

◆ setup_project()

def background.Background.setup_project (   self,
  mkdirs = False,
  run_thresholds = True 
)
Retrieves any missing flagfiles and sets the default flags for the tab.

Args:
    mkdirs (bool, optional): Whether or not to make the directories where the
outputs are saved by default.
    run_thresholds (bool, optional): Whether or not to run thresholds on start.

◆ setup_thresholds()

def background.Background.setup_thresholds (   self)
Sets necessary thresholds apps for the tab.

◆ setup_thresholds_color_variance()

def background.Background.setup_thresholds_color_variance (   self)
Sets color variance thresholds apps for the tab.

◆ switch_ui_elements_for_processing()

def background.Background.switch_ui_elements_for_processing (   self,
  state 
)
Switches element interaction when processing.

Args:
    state (bool): State to which elements should be changed to (i.e.
True for enabled, False for disabled)

◆ sync_with_s3()

def background.Background.sync_with_s3 (   self)
Syncs data available locally with the S3 bucket.

◆ update_buttons()

def background.Background.update_buttons (   self,
  gb 
)
Enables buttons and dropdowns according to whether or not data is present.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ update_data_from_flags()

def background.Background.update_data_from_flags (   self,
  flags 
)
Updates UI elements from the flags.

Args:
    flags (dict[str, _]): Flags corresponding to the tab default binary.

◆ update_data_or_flags()

def background.Background.update_data_or_flags (   self,
  flagfile_fn,
  flagfile_from_data,
  switch_to_flag_tab = False 
)
Updates the flagfile from the UI elements or vice versa.

Args:
    flagfile_fn (str): Name of the flagfile.
    flagfile_from_data (bool): Whether to load the flagfile from the data (True) or
vice versa (False).
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ update_flagfile()

def background.Background.update_flagfile (   self,
  flagfile_fn 
)
Updates the flagfile from UI elements.

Args:
    flagfile_fn (str): Name of the flagfile.

◆ update_flagfile_edit()

def background.Background.update_flagfile_edit (   self,
  flagfile_fn,
  switch_to_flag_tab = True 
)
Updates the edit box for the flagfile.

Args:
    flagfile_fn (str): Name of the flagfile.
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ update_flags_from_data()

def background.Background.update_flags_from_data (   self,
  flags 
)
Updates flags from the UI elements.

Args:
    flags (dict[str, _]): Flags corresponding to the tab default binary.

◆ update_frame_names()

def background.Background.update_frame_names (   self)
Updates dropdowns to account for available frames (on S3 or locally).

◆ update_noise_detail()

def background.Background.update_noise_detail (   self,
  noise,
  detail 
)
Updates noise/detail thresholds interaction.

Args:
    noise (float): Noise threshold.
    detail (float): Detail threshold.

◆ update_thresholds()

def background.Background.update_thresholds (   self,
  type 
)
Updates flagfile threshold values per UI elements.

Args:
    type (str): Type of threshold to run (either "color_variance" or "fg_mask").

◆ update_thresholds_color_variance()

def background.Background.update_thresholds_color_variance (   self)
Updates the displayed thresholds for color variance.

Member Data Documentation

◆ dlg

background.Background.dlg

◆ log_reader

background.Background.log_reader

◆ output_dirs

background.Background.output_dirs

◆ parent

background.Background.parent

◆ tag

background.Background.tag

The documentation for this class was generated from the following file: