Skip to content

Commit

Permalink
Fix exclude argument to write_statsfile in CerebNet/inference.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dkuegler committed Aug 21, 2024
1 parent a1cd120 commit ffe2286
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CerebNet/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def run(self, subject_dirs: SubjectList):
normfile=norm_file,
lut=self.freesurfer_lut_file,
volume_precision="3",
exclude=0,
exclude=[0],
pvfile=norm_file,
report_empty=True,
extra_header=[],
Expand Down
3 changes: 3 additions & 0 deletions FastSurferCNN/segstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,9 @@ def _table_body(file: IO, _dataframe: pd.DataFrame) -> None:
if segfile is not None and not isinstance(segfile, Path):
segfile = Path(segfile)

if exclude is not None and not isinstance(exclude, Sequence):
raise RuntimeError("exclude must be a sequence of ints or None!")

segstatsfile.parent.mkdir(exist_ok=True)
with open(segstatsfile, "w") as fp:
_title(fp)
Expand Down

0 comments on commit ffe2286

Please sign in to comment.