Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion applications/pctpairprotons/pctpairprotons.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import argparse
import json
import re
import itk
from itk import PCT as pct
import numpy as np
Expand Down Expand Up @@ -242,7 +243,7 @@ def load_tree_as_df(root_file, tree_name):

df_itk = itk.GetImageFromArray(ps_np, ttype=ImageType)

output_file = args_info.output.replace(".", f"{r:04d}.")
output_file = re.sub("\\.mhd$", f"{r:04d}.mhd", args_info.output)
itk.imwrite(df_itk, output_file)
verbose(f"Wrote file {output_file}.")

Expand Down
Loading