Skip to content

Commit

Permalink
Making argument name more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
niwilso committed Jul 6, 2023
1 parent 7937611 commit 874c33d
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def redact_from_file(
padding_width: int = 25,
crop_ratio: float = 0.75,
fill: str = "contrast",
return_bboxes: bool = False,
save_bboxes: bool = False,
ocr_kwargs: Optional[dict] = None,
**text_analyzer_kwargs,
) -> None:
Expand All @@ -125,7 +125,7 @@ def redact_from_file(
:param padding_width : Padding width to use when running OCR.
:param fill: Color setting to use for redaction box
("contrast" or "background").
:param return_bboxes: True if we want to save boundings boxes.
:param save_bboxes: True if we want to save boundings boxes.
:param ocr_kwargs: Additional params for OCR methods.
:param text_analyzer_kwargs: Additional values for the analyze method
in AnalyzerEngine.
Expand All @@ -151,7 +151,7 @@ def redact_from_file(
padding_width=padding_width,
overwrite=True,
dst_parent_dir=".",
return_bboxes=return_bboxes,
save_bboxes=save_bboxes,
ocr_kwargs=ocr_kwargs,
**text_analyzer_kwargs,
)
Expand All @@ -167,7 +167,7 @@ def redact_from_directory(
padding_width: int = 25,
crop_ratio: float = 0.75,
fill: str = "contrast",
return_bboxes: bool = False,
save_bboxes: bool = False,
ocr_kwargs: Optional[dict] = None,
**text_analyzer_kwargs,
) -> None:
Expand All @@ -183,7 +183,7 @@ def redact_from_directory(
most common pixel value as the background color value.
:param fill: Color setting to use for redaction box
("contrast" or "background").
:param return_bboxes: True if we want to save boundings boxes.
:param save_bboxes: True if we want to save boundings boxes.
:param ocr_kwargs: Additional params for OCR methods.
:param text_analyzer_kwargs: Additional values for the analyze method
in AnalyzerEngine.
Expand All @@ -209,7 +209,7 @@ def redact_from_directory(
padding_width=padding_width,
overwrite=True,
dst_parent_dir=".",
return_bboxes=return_bboxes,
save_bboxes=save_bboxes,
ocr_kwargs=ocr_kwargs,
**text_analyzer_kwargs,
)
Expand Down Expand Up @@ -769,7 +769,7 @@ def _redact_single_dicom_image(
padding_width: int,
overwrite: bool,
dst_parent_dir: str,
return_bboxes: bool,
save_bboxes: bool,
ocr_kwargs: Optional[dict] = None,
**text_analyzer_kwargs,
) -> str:
Expand All @@ -784,7 +784,7 @@ def _redact_single_dicom_image(
:param overwrite: Only set to True if you are providing the
duplicated DICOM path in dcm_path.
:param dst_parent_dir: String path to parent directory of where to store copies.
:param return_bboxes: True if we want to save boundings boxes.
:param save_bboxes: True if we want to save boundings boxes.
:param ocr_kwargs: Additional params for OCR methods.
:param text_analyzer_kwargs: Additional values for the analyze method
in AnalyzerEngine.
Expand Down Expand Up @@ -845,7 +845,7 @@ def _redact_single_dicom_image(
redacted_dicom_instance.save_as(dst_path)

# Save redacted bboxes
if return_bboxes:
if save_bboxes:
self._save_bbox_json(dst_path, bboxes)

return dst_path
Expand All @@ -858,7 +858,7 @@ def _redact_multiple_dicom_images(
padding_width: int,
overwrite: bool,
dst_parent_dir: str,
return_bboxes: bool,
save_bboxes: bool,
ocr_kwargs: Optional[dict] = None,
**text_analyzer_kwargs,
) -> str:
Expand All @@ -873,7 +873,7 @@ def _redact_multiple_dicom_images(
:param overwrite: Only set to True if you are providing
the duplicated DICOM dir in dcm_dir.
:param dst_parent_dir: String path to parent directory of where to store copies.
:param return_bboxes: True if we want to save boundings boxes.
:param save_bboxes: True if we want to save boundings boxes.
:param ocr_kwargs: Additional params for OCR methods.
:param text_analyzer_kwargs: Additional values for the analyze method
in AnalyzerEngine.
Expand Down Expand Up @@ -903,7 +903,7 @@ def _redact_multiple_dicom_images(
padding_width,
overwrite,
dst_parent_dir,
return_bboxes,
save_bboxes,
ocr_kwargs=ocr_kwargs,
**text_analyzer_kwargs,
)
Expand Down

0 comments on commit 874c33d

Please sign in to comment.