Hi,
I am trying to run a python script that accepts command line arguments as follows.
./Slicer --python-script /home/user/extract_centerlines_vmtk.py --data_dir /PATH/TO/DATA --end_points --network --network_curve --network_prop --centerline --centerline_curve --centerline_prop
and the python script looks as follows
def extract_centerlines(args):
...
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Extract centerlines from a dataset")
parser.add_argument('--data_dir', type=str, help='Path to the dataset directory')
parser.add_argument('--end_points', action='store_true', default=False, help='Save the endpoints')
parser.add_argument('--network', action='store_true', default=False, help='Save the network model')
parser.add_argument('--network_curve', action='store_true', default=False, help='Save the network curve')
parser.add_argument('--network_prop', action='store_true', default=False, help='Save the network properties')
parser.add_argument('--centerline', action='store_true', default=False, help='Save the centerline model')
parser.add_argument('--centerline_curve', action='store_true', default=False, help='Save the centerline curve')
parser.add_argument('--centerline_prop', action='store_true', default=False, help='Save the centerline properties')
args = parser.parse_args()
extract_centerlines(args)
when I run this script using the command above, I get
./Slicer --python-script /home/user/extract_centerlines_vmtk.py --data_dir /PATH/TO/DATA --end_points --network --network_curve --network_prop --centerline --centerline_curve --centerline_prop
>
guessing that it’s expecting something more. I also tried
./Slicer --python-script "/home/user/extract_centerlines_vmtk.py --data_dir /PATH/TO/DATA --end_points --network --network_curve --network_prop --centerline --centerline_curve --centerline_prop"
but I get the error
./Slicer --no-splash --no-main-window --python-script "/home/user/extract_centerlines_vmtk.py --data_dir /PATH/TO/DATA --end_points --network --network_curve --network_prop --centerline --centerline_curve --centerline_prop"
How to run this script with the arguments?