@@ -391,7 +391,7 @@ async def conversion_info(dicom_pair_fp: list[str]) -> dict: # type: ignore[typ
391
391
retain_aspect_ratio = True ,
392
392
)
393
393
raw_buf = BytesIO ()
394
- Image .fromarray (raw_img ).save (raw_buf , format = "PNG" )
394
+ Image .fromarray (raw_img ).save (raw_buf , format = "PNG" ) # type: ignore[no-untyped-call]
395
395
raw_img_base64 = base64 .b64encode (raw_buf .getvalue ()).decode ("utf-8" )
396
396
cleaned_dcm = pydicom .dcmread (dicom_pair_fp [1 ])
397
397
cleaned_img = image_preprocessing (
@@ -401,7 +401,7 @@ async def conversion_info(dicom_pair_fp: list[str]) -> dict: # type: ignore[typ
401
401
retain_aspect_ratio = True ,
402
402
)
403
403
cleaned_buf = BytesIO ()
404
- Image .fromarray (cleaned_img ).save (cleaned_buf , format = "PNG" )
404
+ Image .fromarray (cleaned_img ).save (cleaned_buf , format = "PNG" ) # type: ignore[no-untyped-call]
405
405
cleaned_img_base64 = base64 .b64encode (cleaned_buf .getvalue ()).decode ("utf-8" )
406
406
if cache_bbox_img (dcm_hash = dcm_hash ) is None :
407
407
bboxes_dicom_img = raw_img_base64
@@ -518,7 +518,7 @@ def export_classes(classes: list[str]) -> None:
518
518
output_fp = Path (user_input ["output_dcm_dp" ])
519
519
fps = list (output_fp .rglob ("*.dcm" ))
520
520
session_classes = classes
521
- session_classes .remove (' background' )
521
+ session_classes .remove (" background" )
522
522
session_fp = Path ("./tmp/session-data/session.json" )
523
523
with session_fp .open () as file :
524
524
session_file = json .load (file )
@@ -1082,7 +1082,7 @@ def export_processed_file(
1082
1082
Path (self .clean_dicom_dp ).mkdir (parents = True )
1083
1083
if bbox_img is not None :
1084
1084
bbox_img_fp = self .out_dp + "/" + self .input_dicom_hash + "_bbox" + ".png"
1085
- Image .fromarray (bbox_img ).save (bbox_img_fp )
1085
+ Image .fromarray (bbox_img ).save (bbox_img_fp ) # type: ignore[no-untyped-call]
1086
1086
cache_bbox_img (self .input_dicom_hash )
1087
1087
clean_dicom_fp = self .clean_dicom_dp + "/" + self .input_dicom_hash + ".dcm"
1088
1088
dcm .save_as (clean_dicom_fp )
0 commit comments