Commit fbba286c authored by Sean Fitzgibbon's avatar Sean Fitzgibbon
Browse files

Tidied code

parent 35d815d3
......@@ -919,7 +919,6 @@ def apply_slide_xfm(moving, moving_res, fixed, fixed_res, moving_reg, fixed_reg,
chain = fixed_reg.domain.chain
chain += moving_reg.domain.chain.inverse()
print(inverse)
if inverse:
chain = chain.inverse()
......@@ -949,9 +948,10 @@ def apply_slide_xfm(moving, moving_res, fixed, fixed_res, moving_reg, fixed_reg,
moving_value = moving_native.interpolator(fixed_coords_in_moving_native)
moving_value_reshaped = moving_value.reshape((fixed_native.shape[0],fixed_native.shape[1],3))
# TODO: additional ouput types (beyond jp2) should be supported
import glymur
glymur.Jp2k(out, data=np.round(moving_value_reshaped).astype(moving_native.dtype))
import imageio
imageio.imsave('test_moving.png', np.round(moving_value_reshaped).astype(moving_native.dtype))
imageio.imsave('test_fixed.png', fixed_native.data)
\ No newline at end of file
# import imageio
# imageio.imsave('test_moving.png', np.round(moving_value_reshaped).astype(moving_native.dtype))
# imageio.imsave('test_fixed.png', fixed_native.data)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment