Skip to content

Commit

Permalink
funky NaN problem
Browse files Browse the repository at this point in the history
Former-commit-id: 7e96504
  • Loading branch information
fishingguy456 committed May 31, 2022
1 parent f7e3987 commit f36e203
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion examples/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ def process_one_subject(self, subject_id):
# save output
print(mask.GetSize())
mask_arr = np.transpose(sitk.GetArrayFromImage(mask))
sparse_mask = mask.generate_sparse_mask()


# sparse_mask = mask.generate_sparse_mask()


# np.set_printoptions(threshold=sys.maxsize)
# print(sparse_mask.mask_array.shape)
# print(sparse_mask.mask_array[350:360,290:300,93])
Expand Down
4 changes: 2 additions & 2 deletions imgtools/modules/datagraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ def parser(self, query_string: str) -> pd.DataFrame:
#change relative paths to absolute paths
for col in final_df.columns:
if col.startswith("folder"):
print(self.edge_path, os.path.dirname(self.edge_path))
final_df[col] = final_df[col].apply(lambda x: pathlib.Path(os.path.split(os.path.dirname(self.edge_path))[0], x).as_posix()) #input folder joined with the rel path
# print(self.edge_path, os.path.dirname(self.edge_path))
final_df[col] = final_df[col].apply(lambda x: pathlib.Path(os.path.split(os.path.dirname(self.edge_path))[0], x).as_posix() if isinstance(x, str) else x) #input folder joined with the rel path
return final_df

def graph_query(self,
Expand Down

0 comments on commit f36e203

Please sign in to comment.