Skip to content

Commit

Permalink
fix in transformation manips after API changes in pyaims
Browse files Browse the repository at this point in the history
  • Loading branch information
denisri committed Sep 27, 2023
1 parent df4af85 commit 0d6e2b6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def execution(self, context):
r = -M
#context.write( 'M:', M )
#context.write( 'r:', r )
R = aims.Motion()
R = aims.AffineTransformation3d()
R.rotation().fill(0.)
rot = r.rotation().np[:, :, 0, 0]
# snap/binarize
Expand Down Expand Up @@ -143,11 +143,11 @@ def execution(self, context):
dims2 = [abs(int(round(x))) for x in R.transform(dims)]
#context.write( 'dims: ', str( dims ), ' -> ', str( dims2 ) )
#context.write( 'vs: ', str( vs ), ' -> ', str( vs2 ) )
s = aims.Motion(R)
s = aims.AffineTransformation3d(R)
a = s.rotation()
a[a > 0] = 0.
a[a.np > 0] = 0.
#context.write( 's:', s )
p = -s.transform(dimm)
p = -(s.transform(dimm).np)
#context.write( 'translation:', p )
R.toMatrix()[:3, 3] = p
context.write('apply resampling matrix:')
Expand Down

0 comments on commit 0d6e2b6

Please sign in to comment.