Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix orthogonal interpolation #284

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 37 additions & 28 deletions demo/transforms/deskew.ipynb

Large diffs are not rendered by default.

31 changes: 20 additions & 11 deletions demo/transforms/deskew_artifact_interpolation.ipynb

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions demo/transforms/deskew_x_test.ipynb
Copy link
Member Author

@pr4deepr pr4deepr Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haesleinhuepf I think we ran some of the notebooks before we made some kernel changes, especially the flip z for backward compatbility
As far as I can tell, there are no breaking changes downstream..

Large diffs are not rendered by default.

36 changes: 22 additions & 14 deletions demo/transforms/deskew_x_with_other_data.ipynb

Large diffs are not rendered by default.

39 changes: 19 additions & 20 deletions demo/transforms/inverse_deskewing.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pyclesperanto_prototype/_tier8/_affine_transform_deskew_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def affine_transform_deskew_3d(source: Image, destination: Image = None,
# we invert the transform because we go from the target image to the source image to read pixels
transform_matrix = np.asarray(transform.copy().inverse())

# precalculate these functions that are dependent on deskewing angle
tantheta = np.float32(np.tan(deskewing_angle_in_degrees * np.pi/180))
sintheta = np.float32(np.sin(deskewing_angle_in_degrees * np.pi/180))
costheta = np.float32(np.cos(deskewing_angle_in_degrees * np.pi/180))
# precalculate these functions that are dependent on deskewing angle and ensure they are positive
tantheta = np.float32(np.absolute(np.tan(deskewing_angle_in_degrees * np.pi/180)))
sintheta = np.float32(np.absolute(np.sin(deskewing_angle_in_degrees * np.pi/180)))
costheta = np.float32(np.absolute(np.cos(deskewing_angle_in_degrees * np.pi/180)))

gpu_transform_matrix = push(transform_matrix)

Expand Down