Skip to content

Commit

Permalink
rename size_increase to step
Browse files Browse the repository at this point in the history
  • Loading branch information
adivardi committed Apr 24, 2024
1 parent 70a5580 commit 4441f8d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions labelCloud/control/bbox_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,41 +298,41 @@ def scale(

@has_active_bbox_decorator
def scale_along_length(
self, size_increase: Optional[float] = None, decrease: bool = False
self, step: Optional[float] = None, decrease: bool = False
) -> None:
size_increase = size_increase or config.getfloat("LABEL", "std_scaling")
step = step or config.getfloat("LABEL", "std_scaling")
if decrease:
size_increase *= -1
step *= -1

active_bbox: Bbox = self.get_active_bbox() # type: ignore
length, width, height = active_bbox.get_dimensions()
new_length = length + size_increase
new_length = length + step
active_bbox.set_dimensions(new_length, width, height)

@has_active_bbox_decorator
def scale_along_width(
self, size_increase: Optional[float] = None, decrease: bool = False
self, step: Optional[float] = None, decrease: bool = False
) -> None:
size_increase = size_increase or config.getfloat("LABEL", "std_scaling")
step = step or config.getfloat("LABEL", "std_scaling")
if decrease:
size_increase *= -1
step *= -1

active_bbox: Bbox = self.get_active_bbox() # type: ignore
length, width, height = active_bbox.get_dimensions()
new_width = width + size_increase
new_width = width + step
active_bbox.set_dimensions(length, new_width, height)

@has_active_bbox_decorator
def scale_along_height(
self, size_increase: Optional[float] = None, decrease: bool = False
self, step: Optional[float] = None, decrease: bool = False
) -> None:
size_increase = size_increase or config.getfloat("LABEL", "std_scaling")
step = step or config.getfloat("LABEL", "std_scaling")
if decrease:
size_increase *= -1
step *= -1

active_bbox: Bbox = self.get_active_bbox() # type: ignore
length, width, height = active_bbox.get_dimensions()
new_height = height + size_increase
new_height = height + step
active_bbox.set_dimensions(length, width, new_height)

def select_bbox_by_ray(self, x: int, y: int) -> None:
Expand Down

0 comments on commit 4441f8d

Please sign in to comment.