Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HastingsGreer authored Mar 16, 2024
1 parent 2ad240a commit 9f6aec3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/unigradicon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def warp_command():
parser = argparse.ArgumentParser()
parser.add_argument("--fixed", required=True)
parser.add_argument("--moving", required=True)
parser.add_argument("--transform", required=True)
parser.add_argument("--transform")
parser.add_argument("--warped_moving_out", required=True)
parser.add_argument('--nearest_neighbor', action='store_true')
parser.add_argument('--linear', action='store_true')
Expand All @@ -231,8 +231,10 @@ def warp_command():

fixed = itk.imread(args.fixed)
moving = itk.imread(args.moving)

phi_AB = itk.transformread(args.transform)[0]
if not args.transform:
phi_AB = itk.IdentityTransform[itk.D, 3].New()
else:
phi_AB = itk.transformread(args.transform)[0]

if args.linear:
interpolator = itk.LinearInterpolateImageFunction.New(moving)
Expand Down

0 comments on commit 9f6aec3

Please sign in to comment.