Skip to content
Snippets Groups Projects
Commit ffd3a19d authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Progress on running workflow, still throwing errors but suspect these just...

Progress on running workflow, still throwing errors but suspect these just require method signature updates
parent 135db6c7
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,7 @@ class MonoPatchStackFromFile(MonoPatchStack):
def fpath(self):
return self.file_acc.fpath
# TODO: unify this into one accessor
class Multichannel3dPatchStack(InMemoryDataAccessor):
def __init__(self, data):
......
......@@ -195,7 +195,7 @@ class RoiSet(object):
else:
patches_df = get_patches_from_zmask_meta(self, pad_to=pad_to)
patches = list(patches_df['patch'])
if self.acc_raw.chroma == 1:
if channel is not None or self.acc_raw.chroma == 1:
return MonoPatchStack(patches)
else:
return Multichannel3dPatchStack(patches)
......@@ -256,13 +256,13 @@ class RoiSet(object):
# df['classify_by_' + f]
# assign labels to object map:
for i in idx:
for i in range(0, len(idx)):
# object_id = self.zmask_meta[i]['info'].label
object_id = df.loc[i, 'label']
object_id = df.loc[idx[i], 'label']
result_patch = mask_largest_object(obmap_patches.iat(i))
object_class = np.unique(result_patch)[1]
om[self.object_id_labels == object_id] = object_class
se.loc[i] = object_class
se.loc[idx[i]] = object_class
self.add_df_col('classify_by_' + name, se)
self.object_class_map[name] = InMemoryDataAccessor(om)
......@@ -279,7 +279,7 @@ class RoiSet(object):
continue
if k == 'patches_3d':
files = export_patches_from_zstack(
subdir, raw_ch, self.zmask_meta, prefix=pr, make_3d=True, **kp
subdir, self, white_channel=channel, prefix=pr, make_3d=True, **kp
)
if k == 'patches_2d_for_annotation':
files = export_multichannel_patches_from_zstack(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment