DiatomTrack.gui package
Submodules
DiatomTrack.gui.editor module
- class DiatomTrack.gui.editor.TrackEditor(tracks, video_path)[source]
Bases:
objectMain GUI window of the DiatomTrack editor for manual editing and review.
- canvas_double_right(event)[source]
Select and highlight closest object in canvas upon double right click.
- draw_overlay(image)[source]
Draw the corresponding overlay on the current video frame for all activated information.
- find_age_line_points(row)[source]
Find end points for drawing the side / age / theca marker lines of the cells.
- find_trace_line_points(item)[source]
Find the line points of the long axis to draw the trace of an object for the last 10 frames’ position.
- jump_to_frame(*args)[source]
Jump to a frame in the video and update corresponding widgets and overlay.
- jump_to_time(*args)[source]
Jump to a timestamp in the video and update corresponding widgets and overlay.
- listbox_right_click(*args)[source]
Remove selected item from listbox when moving tracks in the forest.
- manual_update_canvas()[source]
Update video canvas for cases not covered by update_canvas / manual interventions.
- remove()[source]
Remove items from tree by setting ‘show’ column to 0 in the dataframe and display them in the sparate deleted listbox.
- restore()[source]
Restore elements that were removed from the tree by setting the ‘show’ column to 1 in the dataframe.
- swap_tracklets()[source]
Swap two selected tracks at the selected frame (assign everything after the frame to the other).
- tree_select(*args)[source]
Populate list box with frames upon selecting a tree item and highlight the object in the video frame if applicable.
- ui_init(name)[source]
Initialize all window widgets.
- Parameters:
name (str) – Name of the experiment for window naming.
- Return type:
None.
DiatomTrack.gui.load module
- class DiatomTrack.gui.load.ReadSegmentationWindow(file)[source]
Bases:
objectClass containing window and reading of segmentation data.
- class DiatomTrack.gui.load.ReadTrackVideoWindow(file)[source]
Bases:
objectClass containing window and extraction of tracking data from track video file.
- class DiatomTrack.gui.load.ReadTrackWindow(file)[source]
Bases:
objectClass containing window and reading of tracking data.
- DiatomTrack.gui.load.read_seg(name)[source]
Create and close window for reading of segmentation data.
- Parameters:
name (str) – Path to file.
- Returns:
The segmentation data (contours).
- Return type:
dict
DiatomTrack.gui.parser module
- class DiatomTrack.gui.parser.ParserDirectory[source]
Bases:
objectGUI for parsing initial directories for processing from scratch.
- class DiatomTrack.gui.parser.ParserEditor[source]
Bases:
objectGUI for parsing directories and files for editor.
- class DiatomTrack.gui.parser.ParserSkip[source]
Bases:
objectGUI for parsing directories for processing from tracking.
- class DiatomTrack.gui.parser.ParserTrack[source]
Bases:
objectGUI for parsing tracking parameters.
- DiatomTrack.gui.parser.parse_editor()[source]
Get the file and saving information for the editor.
- Returns:
Paths to video, track data or combined as track video file, and save directory, and save name.
- Return type:
tuple
- DiatomTrack.gui.parser.parse_segmentation()[source]
Get the paths and directories for segmentation and additional information, None if parsing / step is skipped.
- Returns:
Parsed directories, paths and parameters, or None.
- Return type:
tuple or None
- DiatomTrack.gui.parser.parse_tracker()[source]
Get the tracking parameters.
- Returns:
age (int) – Maximum frames an object may be undetected.
offset (int) – The maximum distance in Euclidean tracking.
split (int) – The maximum distance to consider splitting.
gap (int) – The maximum distance for matching after detection gap.
DiatomTrack.gui.save module
- class DiatomTrack.gui.save.SaveData(destination_directory, name, video_file, dataframe, original_dataframe, start_time, counts)[source]
Bases:
objectThe class containing the window for final saving of data.