Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Sep 6, 2024
2 parents 87102b2 + 9bbf26e commit 0dcd06b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
11 changes: 7 additions & 4 deletions simba/data_processors/cuda/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
__email__ = "[email protected]"


import math
import os
from typing import Optional, Union
import math

try:
from typing import Literal
except:
Expand All @@ -20,6 +21,7 @@
import numpy as np
from numba import cuda

from simba.mixins.image_mixin import ImageMixin
from simba.utils.checks import (check_file_exist_and_readable, check_float,
check_if_dir_exists,
check_if_string_value_is_valid_video_timestamp,
Expand All @@ -30,9 +32,10 @@
from simba.utils.data import find_frame_numbers_from_time_stamp
from simba.utils.enums import Formats
from simba.utils.errors import FFMPEGCodecGPUError, InvalidInputError
from simba.utils.printing import stdout_success, SimbaTimer
from simba.utils.read_write import (check_if_hhmmss_timestamp_is_valid_part_of_video, get_fn_ext, get_video_meta_data, read_img_batch_from_video_gpu)
from simba.mixins.image_mixin import ImageMixin
from simba.utils.printing import SimbaTimer, stdout_success
from simba.utils.read_write import (
check_if_hhmmss_timestamp_is_valid_part_of_video, get_fn_ext,
get_video_meta_data, read_img_batch_from_video_gpu)

PHOTOMETRIC = 'photometric'
DIGITAL = 'digital'
Expand Down
6 changes: 4 additions & 2 deletions simba/roi_tools/ROI_define.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import pandas as pd

from simba.mixins.config_reader import ConfigReader
from simba.mixins.plotting_mixin import PlottingMixin
from simba.mixins.pop_up_mixin import PopUpMixin
from simba.roi_tools.ROI_image import ROI_image_class
from simba.roi_tools.ROI_move_shape import move_edge, update_all_tags
from simba.roi_tools.ROI_multiply import create_emty_df
from simba.roi_tools.ROI_size_calculations import (circle_size_calc, polygon_size_calc, rectangle_size_calc)
from simba.mixins.plotting_mixin import PlottingMixin
from simba.roi_tools.ROI_size_calculations import (circle_size_calc,
polygon_size_calc,
rectangle_size_calc)
from simba.ui.tkinter_functions import SimbaButton, hxtScrollbar
from simba.utils.checks import check_file_exist_and_readable
from simba.utils.enums import Formats, TagNames
Expand Down
2 changes: 1 addition & 1 deletion simba/roi_tools/ROI_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import numpy as np
import pandas as pd

from simba.mixins.plotting_mixin import PlottingMixin
from simba.roi_tools.ROI_move_shape import move_edge, move_edge_align
from simba.roi_tools.ROI_zoom import zoom_in
from simba.utils.data import add_missing_ROI_cols
from simba.utils.enums import ConfigKey, Keys, Paths
from simba.utils.errors import InvalidInputError
from simba.utils.read_write import get_fn_ext, read_config_file
from simba.mixins.plotting_mixin import PlottingMixin


class ROI_image_class:
Expand Down
3 changes: 2 additions & 1 deletion simba/roi_tools/ROI_size_calculations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import math

import numpy as np
from shapely.geometry import Polygon
from scipy.spatial import ConvexHull
from shapely.geometry import Polygon


def rectangle_size_calc(rectangle_dict: dict, px_mm: float) -> dict:
Expand Down
4 changes: 2 additions & 2 deletions simba/utils/read_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
check_if_string_value_is_valid_video_timestamp,
check_instance, check_int,
check_nvidea_gpu_available, check_str,
check_valid_dataframe, check_valid_lst,
check_valid_array, check_valid_boolean)
check_valid_array, check_valid_boolean,
check_valid_dataframe, check_valid_lst)
from simba.utils.enums import ConfigKey, Dtypes, Formats, Keys, Options
from simba.utils.errors import (DataHeaderError, DuplicationError,
FFMPEGCodecGPUError, FileExistError,
Expand Down

0 comments on commit 0dcd06b

Please sign in to comment.