chore: prune boilerplate and refresh stale docs
- Remove 257 redundant per-definition comment stubs across the package - Drop dead nonlocal declarations in autoslicer_detection.py - Document the swapped flag and swap_left_right in architecture docs - Remove unsupported 'legacy override' claims from autotune/runtime docs
This commit is contained in:
parent
929c828438
commit
426a18f342
24 changed files with 5 additions and 264 deletions
|
|
@ -6,7 +6,6 @@ from .autoslicer_feedback import AutoslicerFeedbackMixin
|
|||
from .params import AutoslicerParams
|
||||
|
||||
|
||||
# Autoslicer: class definition for ScanSlicer behavior.
|
||||
class Autoslicer(AutoslicerFeedbackMixin, AutoslicerDetectionMixin):
|
||||
MAX_RETURNED_BOXES = 400
|
||||
MAX_FEEDBACK_ENTRIES = 500
|
||||
|
|
@ -31,7 +30,6 @@ class Autoslicer(AutoslicerFeedbackMixin, AutoslicerDetectionMixin):
|
|||
"dilate_kernel",
|
||||
)
|
||||
|
||||
# __init__: function definition for ScanSlicer behavior.
|
||||
def __init__(self, params=None):
|
||||
self.image = None
|
||||
self.image_gray = None
|
||||
|
|
@ -41,30 +39,24 @@ class Autoslicer(AutoslicerFeedbackMixin, AutoslicerDetectionMixin):
|
|||
self.set_params(params)
|
||||
self.feedback_entries = self.load_feedback_entries()
|
||||
|
||||
# set_params: function definition for ScanSlicer behavior.
|
||||
def set_params(self, params):
|
||||
self.params = params if params is not None else AutoslicerParams()
|
||||
|
||||
# image_loaded: function definition for ScanSlicer behavior.
|
||||
def image_loaded(self):
|
||||
return self.image is not None
|
||||
|
||||
# load_image: function definition for ScanSlicer behavior.
|
||||
def load_image(self, image_path):
|
||||
self.image_path = image_path
|
||||
self.image = cv2.imread(image_path)
|
||||
self.image_gray = cv2.cvtColor(self.image, cv2.COLOR_BGR2GRAY)
|
||||
|
||||
# abort_operation: function definition for ScanSlicer behavior.
|
||||
def abort_operation(self):
|
||||
self.abort_flag = True
|
||||
|
||||
# update_status: function definition for ScanSlicer behavior.
|
||||
def update_status(self, update_status_callback, text):
|
||||
if update_status_callback is not None:
|
||||
update_status_callback(text)
|
||||
|
||||
# save_slice: function definition for ScanSlicer behavior.
|
||||
def save_slice(self, hull_quad, out_path, imwrite_params=None):
|
||||
hull_quad = np.array(hull_quad, dtype=np.float32).reshape(4, 2)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue