GUI Utility¶
KALMUS tkinter GUI utility
-
kalmus.tkinter_windows.gui_utils.
compare_two_barcodes
(barcode_1, barcode_2)[source]¶ Compare the similarity between two barcodes using NRMSE, SSIM, cross correlation, local cross correlation, Needleman Wunsch, and Smith Waterman alignment matching
- Parameters
barcode_1 -- The input barcode 1
barcode_2 -- The input barcode 2
- Returns
The simiarity scores computed using all six metrics
-
kalmus.tkinter_windows.gui_utils.
get_comparison_result_text
(barcode_1, barcode_2)[source]¶ Get the text comparison result using the compare_two_barcodes function
- Parameters
barcode_1 -- The compared barcode 1
barcode_2 -- The compared barcode 2
- Returns
The text comparison result
-
kalmus.tkinter_windows.gui_utils.
get_time
(barcode, x_pos, y_pos)[source]¶ Get the time (hr, min, sec) at a point of barcode
- Parameters
barcode -- The barcode object
x_pos -- The x position of the query
y_pos -- The y position of the query
- Returns
time frame, hr, min, sec at the given point (x_pos, y_pos)
-
kalmus.tkinter_windows.gui_utils.
paint_gray_hist
(bin_step, patches, opacity=0.8)[source]¶ Paint each bin of the brightness histogram with its corresponding brightness intensity (in place)
- Parameters
bin_step -- The step of the bin in the histogram
patches -- The patches of the histogram
opacity -- Opacity of the brightness intensity to avoid totally white in the high intensity bin To make the histogram bin in high intensity area more observable
-
kalmus.tkinter_windows.gui_utils.
paint_hue_hist
(bin_step, patches)[source]¶ Paint each bin of the hue histogram with its corresponding color in hue (in place)
- Parameters
bin_step -- The step of the bin in the histogram
patches -- The patches of the histogram that will be painted later
-
kalmus.tkinter_windows.gui_utils.
resource_path
(relative_path)[source]¶ Internal utility function Use to convert the input relative path to the absolute path This is used for the Pyinstaller wrapper
- Parameters
relative_path -- The relative path to the file
- Returns
The absolute path to the file
-
kalmus.tkinter_windows.gui_utils.
update_axes_ticks
(barcode1, barcode2, axes)[source]¶ Update the axes ticks If two barcodes have the same temporal dimensions, the ticks will show the temporal position of a pixel in the barcode image. Otherwise, the axes ticks will show the spatial position of a pixel.
- Parameters
barcode1 -- The barcode 1
barcode2 -- The barcode 2
axes -- The axes of the plotted figure
-
kalmus.tkinter_windows.gui_utils.
update_axes_title
(axes, barcode_1, barcode_2)[source]¶ Update the title of the plotted axes (in place)
- Parameters
axes -- The plotted axes of the figure
barcode_1 -- The barcode 1
barcode_2 -- The barcode 2