Skip to content

Commit

Permalink
Added -e option to save cranioplasty file.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulojamorim committed Sep 24, 2024
1 parent de4ed63 commit 6df03f2
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,25 +360,31 @@ def use_cmd_optargs(args):
if args.save:
Publisher.sendMessage("Save project", filepath=os.path.abspath(args.save))
exit(0)

check_for_cranioplasty(args)
check_for_export(args)

if args.cranioplasty:
check_for_cranioplasty(args)
else:
check_for_export(args)
return True

elif args.import_folder:
Publisher.sendMessage("Import folder", folder=args.import_folder)
if args.save:
Publisher.sendMessage("Save project", filepath=os.path.abspath(args.save))
exit(0)
check_for_export(args)
if args.cranioplasty:
check_for_cranioplasty(args)
else:
check_for_export(args)

elif args.other_file:
Publisher.sendMessage("Open other files", filepath=args.other_file)
if args.save:
Publisher.sendMessage("Save project", filepath=os.path.abspath(args.save))
exit(0)
check_for_export(args)
if args.cranioplasty:
check_for_cranioplasty(args)
else:
check_for_export(args)

elif args.import_all:
import invesalius.reader.dicom_reader as dcm
Expand Down Expand Up @@ -441,9 +447,11 @@ def check_for_cranioplasty(args):
# create implant mask
Publisher.sendMessage("Create implant for cranioplasty")

path_ = args.export

# convert masks to surfaces and exports them.
Publisher.sendMessage(
"Export all surfaces separately", folder="./", filetype=const.FILETYPE_STL
"Export all surfaces separately", folder=path_, filetype=const.FILETYPE_STL
)


Expand Down

0 comments on commit 6df03f2

Please sign in to comment.