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

RoiSet test was calling a method that was dropped during merge; re-inserted it

parent 9c444ae9
No related branches found
No related tags found
No related merge requests found
...@@ -672,12 +672,14 @@ class RoiSet(object): ...@@ -672,12 +672,14 @@ class RoiSet(object):
return InMemoryDataAccessor(om) return InMemoryDataAccessor(om)
def get_serializable_dataframe(self) -> pd.DataFrame:
return self._df.drop(['expanded_slice', 'slice', 'relative_slice', 'binary_mask'], axis=1)
def export_dataframe(self, csv_path: Path) -> str: def export_dataframe(self, csv_path: Path) -> str:
csv_path.parent.mkdir(parents=True, exist_ok=True) csv_path.parent.mkdir(parents=True, exist_ok=True)
self._df.drop(['expanded_slice', 'slice', 'relative_slice', 'binary_mask'], axis=1).to_csv(csv_path, index=False) self.get_serializable_dataframe().to_csv(csv_path, index=False)
return csv_path.name return csv_path.name
def export_patch_masks(self, where: Path, pad_to: int = None, prefix='mask', expanded=False) -> pd.DataFrame: def export_patch_masks(self, where: Path, pad_to: int = None, prefix='mask', expanded=False) -> pd.DataFrame:
patches_df = self.get_patch_masks(pad_to=pad_to, expanded=expanded).copy() patches_df = self.get_patch_masks(pad_to=pad_to, expanded=expanded).copy()
...@@ -994,10 +996,7 @@ class RoiSet(object): ...@@ -994,10 +996,7 @@ class RoiSet(object):
csv_path = where / 'dataframe' / (prefix + '.csv') csv_path = where / 'dataframe' / (prefix + '.csv')
csv_path.parent.mkdir(parents=True, exist_ok=True) csv_path.parent.mkdir(parents=True, exist_ok=True)
self._df.drop( self.export_dataframe(csv_path)
['expanded_slice', 'slice', 'relative_slice', 'binary_mask'],
axis=1
).to_csv(csv_path, index=False)
record['dataframe'] = str(Path('dataframe') / csv_path.name) record['dataframe'] = str(Path('dataframe') / csv_path.name)
......
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