From fc3f3655d5899236b7e26911f7d6a3e31ba7e258 Mon Sep 17 00:00:00 2001 From: Miroslav Jirik Date: Mon, 3 Feb 2020 22:50:38 +0100 Subject: [PATCH] commented unused code --- micrant/image_sort_tools.py | 56 ++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/micrant/image_sort_tools.py b/micrant/image_sort_tools.py index b16380f..1ba5ae4 100644 --- a/micrant/image_sort_tools.py +++ b/micrant/image_sort_tools.py @@ -75,34 +75,34 @@ def get_image_from_ann_id(anim: scaffan.image.AnnotatedImage, ann_id, level): return img -def generate_images(unique_df): - anim = None - prev_pth = "" - for index, row in unique_df.iterrows(): - pth = row["File Path"] - if prev_pth != pth: - anim = scaffan.image.AnnotatedImage(pth) - img = get_image_from_ann_id(anim, row["Annotation ID"]) - prev_pth = pth - yield row, img - - -def generate_image_couples(unique_df): - anim = None - prev_pth = "" - prev_row = None - prev_img = None - for index, row in unique_df.iterrows(): - pth = row["File Path"] - if prev_pth != pth: - anim = scaffan.image.AnnotatedImage(pth) - ann_id = row["Annotation ID"] - img = get_image_from_ann_id(anim, ann_id) - if prev_row is not None: - yield row, img, prev_row, prev_img - prev_pth = pth - prev_row = row - prev_img = img +# def generate_images(unique_df): +# anim = None +# prev_pth = "" +# for index, row in unique_df.iterrows(): +# pth = row["File Path"] +# if prev_pth != pth: +# anim = scaffan.image.AnnotatedImage(pth) +# img = get_image_from_ann_id(anim, row["Annotation ID"]) +# prev_pth = pth +# yield row, img +# +# +# def generate_image_couples(unique_df): +# anim = None +# prev_pth = "" +# prev_row = None +# prev_img = None +# for index, row in unique_df.iterrows(): +# pth = row["File Path"] +# if prev_pth != pth: +# anim = scaffan.image.AnnotatedImage(pth) +# ann_id = row["Annotation ID"] +# img = get_image_from_ann_id(anim, ann_id) +# if prev_row is not None: +# yield row, img, prev_row, prev_img +# prev_pth = pth +# prev_row = row +# prev_img = img def add_parameter_column(df, df_micrant, colname):