NeuroPAL_ID Processing GUI¶
GUI Controller¶
- class Program.GUI.preprocessing_gui¶
PREPROCESSING_GUI Summary of this class goes here Detailed explanation goes here
- Constructor Summary
- preprocessing_gui(type)¶
PREPROCESSING_GUI Constructs a persistent instance of the preprocessing gui.
Inputs: - type (Optional): string/char representing the type of
volume we are dealing with. One of ‘image’ or ‘video’.
Outputs: - obj: preprocessing_gui instance.
- Property Summary
- canvas¶
image_editing_canvas instance.
- histograms¶
histograms instance.
- maximum_bytes¶
The maximum size of arrays we allow users to load without triggering our preprocessing routine.
- sidebar¶
preprocessing_sidebar instance.
- Method Summary
- static check_data_size(file_path)¶
CHECK_FILE_SIZE Calculates the size of the data contained within a given file and checks it against our preprocessing threshold.
Inputs: - file_path: String/char representing the path to the file
in question.
Outputs: - code: Integer describing the outcome of running this
- function as such:
0 -> Data size is smaller than our threshold. 1 -> Data size exceeds preprocessing threshold and
needs to be preprocessed.
2 -> Failed to assess data size.
- static check_for_preprocessing_threshold(file_path)¶
CHECK_FOR_PREPROCESSING_THRESHOLD Checks whether a given file needs to be passed to the preprocessing routine. If so, passes file to preprocessing load function.
Inputs: - file_path: String/char representing the path to the file
in question.
Outputs: - code: Integer describing the outcome of running this
- function as such:
0 -> File was not submitted to preprocessing. 1 -> File was submitted to preprocessing. 2 -> File needed preprocessing, but user opted out. 3 -> Could not determine whether file needs to be
preprocessed. This occurs if we are unable to calculate the data size.
- static delete()¶
DELETE This function is called when the GUI is closed, such as on program close or crash.
- pass_to_main()¶
PASS_TO_MAIN Transfers processed result to either the ID or the tracking tab, depending on whether we’re dealing with an image or a video.
Inputs: - obj: preprocessing_gui instance.
- set_gui_configuration(type)¶
SET_GUI_CONFIGURATION Configures all child GUI components to ensure that only those relevant to the selected volume type (i.e. image or video) are accessible.
Inputs: - obj: preprocessing_gui instance. - type: string/char, one of “image” or “video”.
Outputs: - obj: preprocessing_gui instance.
- set_gui_limits(varargin)¶
SET_GUI_LIMITS Updated all child gui components limit properties.
Inputs: - obj: preprocessing_gui instance. - varargin: Cell array of sequential key-value pairs which
represent variable input arguments (e.g. ‘x’, 1x2 arr). See parser below for further details.
Outputs: - obj: preprocessing_gui instance.
GUI Canvas¶
- class Program.GUI.Panels.image_editing_canvas¶
IMAGE_EDITING_AXES Class responsible for managing the canvas within the processing tab.
Glossary: - canvas = The group of GUI components, such as axes and sliders,
which together facilitate the viewing & perusing of a loaded image or video.
- projection = The set of dimensions along which we are viewing a
loaded image or video. By default, we are looking at individual slices along the z dimensions, so the default projection is z. The projection may also be switched to xyz.
- Constructor Summary
- image_editing_canvas()¶
IMAGE_MANIPULATION Constructs a persistent instance of the image manipulation panel.
- Property Summary
- axes¶
Struct of axes components (one field/projection).
- grid¶
Parent grid layout containing this panel.
- image_only_components¶
Struct featuring components exclusive to images.
- projection¶
Dimensions currently projected within axes.
- sliders¶
Struct of slider components (one field/dimension).
- video_only_components¶
Struct featuring components exclusive to videos.
- Method Summary
- static is_working_with_video()¶
IS_WORKING_WITH_VIDEO Helper function that returns true if the viewpoer is currently displaying a video and false if it is currently displaying an image.
- set_display_configuration(projection)¶
SET_DISPLAY_CONFIGURATION Edits relevant grid layout to ensure layout serves the functionality the user is currently engaging with.
- set_gui_configuration(mode)¶
- set_projection(projection)¶
SET_PROJECTION Updates GUI configuration in accordance with a given projection.
Input: - obj: image_editing_canvas instance. - projection: char describing dimensions to project, e.g.
“xyzt”, “xyz”, “z”, etc.
Editor Panel¶
- class Program.GUI.Panels.image_editing_gui¶
IMAGE_MANIPULATION Class responsible for managing the image manipulation interface within the processing tab, as well as any helper functions that its child components rely upon.
- Constructor Summary
- image_editing_gui()¶
IMAGE_MANIPULATION Constructs a persistent instance of the image manipulation panel.
- Property Summary
- buttons¶
Struct containing relevant child buttons.
- cache¶
Cache of original, unmanipulated image.
- grid¶
Parent grid layout containing this panel.
- panels¶
Struct containing relevant child panels.
- Method Summary
- save_array_to_cache(array)¶
SAVE_ARRAY_TO_CACHE Saves a given array to the class cache property. This allows us to avoid reloading the current image from file should the user require consecutive processing previews.
Input - obj: image_manipulation class instance - array: numerical array representing an image.
Output - obj: image_manipulation class instance
- set_display_configuration(mode)¶
SET_DISPLAY_CONFIGURATION Edits relevant grid layout to ensure layout serves the functionality the user is currently engaging with. For example, if we are working with a video, we display frame trimming components.
Inputs: - obj = image_editing_gui instance. - mode = string or char that is one of ‘crop’, ‘rotate’,
or ‘downsample’, each representing one of the possible image editing operations.
Outputs: - obj = image_editing_gui instance.
- set_video_configuration()¶
SET_VIDEO_CONFIGURATION Configure the GUI and its components properties such that users are able to edit videos.
Inputs: - obj: image_manipulation instance.
Outputs: - obj: image_manipulation instance.
Channel Controller¶
- class Program.Handlers.channels¶
- Property Summary
- config¶
Dictionary containing various settings.
- fluorophore_map¶
Dictionary of channel colors and their respective fluorophores.
- handles¶
Dictionary of string patterns for each type of channel component.
- names¶
Dictionary of various channel name formats.
- Method Summary
- static add_channel()¶
- static add_reference(name)¶
add_reference Adds one or more reference names to UI elements. ┌─────────────────────────────────────────────────────────────┐ │ Description: │ │ This function updates the reference-related UI components │ │ so they include the provided reference name(s). │ │ │ │ ———————————————————– │ │ │ │ Args: │ │ - name (char | string | cell): The name of the reference │ │ to be added. If multiple references are passed in a │ │ cell array, the function iterates over each. │ │ │ │ ———————————————————– │ │ │ │ Notes: │ │ - If ‘name’ is not a string/char and is not scalar, it’s │ │ treated as a collection (e.g., cell array). │ └─────────────────────────────────────────────────────────────┤ Reminder:
↓ Please don’t forget to add comments!
- static delete(channel)¶
Delete a channel from the processing tab. ┌─────────────────────────────────────────────────────────────┐ │ Notes: │ │ - If the channel is last in the grid layout, we simply │ │ delete it. Otherwise, we move all channels one row down │ │ first. │ │ │ │ ———————————————————– │ │ │ │ Args: │ │ - channel (double | string | char): │ │ Either the row number or the name of the channel to be │ │ deleted. │ └─────────────────────────────────────────────────────────────┤ Reminder:
↓ Please don’t forget to add comments!
- static edit_channels()¶
- static get_bools(mode)¶
- static get_channel_struct()¶
- static get_max_idx()¶
- static parse_channel_gui()¶
- static parse_info(channel_names)¶
- static populate(order)¶
- static remove_reference(name)¶
remove_reference Removes a specified reference name from UI elements. ┌─────────────────────────────────────────────────────────────┐ │ Description: │ │ This function removes the specified reference name from │ │ the set of reference dropdowns in rows 4 through │ │ ‘length(supported_references)’. If the reference is │ │ currently selected, the corresponding channel is deleted. │ │ Otherwise, only the reference name is removed from the │ │ dropdown. │ │ │ │ ———————————————————– │ │ │ │ Args: │ │ - name (char | string): The name of the reference to be │ │ removed from the UI elements. │ │ │ │ ———————————————————– │ │ │ │ Notes: │ │ - ‘supported_references’ must be available in scope here. │ │ - The loop iterates backward from the highest reference │ │ index down to row 4. │ └─────────────────────────────────────────────────────────────┤ Reminder:
↓ Please don’t forget to add comments!
- static set_gamma(gamma)¶
- static set_idx(order, ~)¶
- static set_references(info)¶
set_references Updates item properties of reference dropdowns. ┌─────────────────────────────────────────────────────────────┐ │ Description: │ │ This function sets the item property of every reference │ │ related dropdown component in accordance with the info │ │ struct that was loaded from a given NeuroPAL file. │ │ │ │ ———————————————————– │ │ │ │ Args: │ │ - info (struct): info field loaded from a NeuroPAL file. │ └─────────────────────────────────────────────────────────────┤ Reminder:
↓ Please don’t forget to add comments!
Histogram Controller¶
- class Program.Handlers.histograms¶
Legacy Orphans¶
- Program.Routines.Processing.crop()¶
- Program.Routines.Processing.load_file(mode, path)¶
- Program.Routines.Processing.parse_gui()¶
- Program.Routines.Processing.pass_to_main()¶
- Program.Routines.Processing.quick_render()¶
- Program.Routines.Processing.render()¶
- Program.Routines.Processing.reset()¶
- Program.Routines.Processing.save()¶
- Program.Routines.Processing.save_prompt(action)¶