Skip to content

Commit

Permalink
commented unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
mjirik committed Feb 3, 2020
1 parent 9ad6b15 commit fc3f365
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions micrant/image_sort_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fc3f365

Please sign in to comment.