-
Notifications
You must be signed in to change notification settings - Fork 0
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
translation works but not rotation #3
Comments
Hi @xuefan007, thank you very much for your feedback. For you first question, my guess is that there is an issue with the import numpy as np
import pyclesperanto_prototype as cle
a = np.random.rand(10,10,10)
print(cle.rotate(
source=a,
angle_around_z_in_degrees=10,
angle_around_y_in_degrees=10,
angle_around_x_in_degrees=10,
rotate_around_center=True,
linear_interpolation=False,
auto_size=False
)) If the function does display the expected result, then this might just be due to the fact that the data you are using is too voluminous, so much that the For your second question, I am not sure I fully understand. Are you asking if it is possible to load two views ("floating" and "reference" in the plugin) that have different voxel sizes (i.e the spacing in z has a 5% difference between the two views) ? |
Hi @jules-vanaret, Thanks so much for your kind reply. I am sorry for the late reply since I was out of lab for 1 week. I run your testing code, it seems do has problem with cle: "RecommendedHashNotFoundWarning: Unable to import recommended hash 'siphash24.siphash13', falling back to 'hashlib.sha256'. Run 'python3 -m pip install siphash24' to install the recommended hash." The plug-in was working for 2D for both translation and rotation. Only has problem with 3D data. The data size i am trying now is for testing: roughfly 800 x 800 pix, with 80 slices. About 100 mb. For the last question, it is indeed as you understood. I am asking if it is possible to load two views ("floating" and "reference" in the plugin) that have different voxel sizes (i.e the spacing in z has a 5% difference between the two views) ? Thanks to much! |
Hi @xuefan007 , no problem! By the way, do you have a GPU on your computer ? If not, running For your second question, I guess if the two views don't have the same voxel size, the problem is slightly ill posed... In practice, it depends on the level of precision you want to achieve. From the napari interface, you can change the "display voxel size" by clicking on the bottom left-most button which looks like ">_". Then type I hope this helped you, feel free to reach out if you need! |
Hi @jules-vanaret, Thanks for your kind answer! I checked the pyclesperanto_prototype library, and find out that my mac need to install this: Your test code work like this: [[0.2754557 0.9708368 0.07435158 0.4157816 0.26321292 0. [[0.00958189 0.79772276 0.52357405 0.3686382 0.20200828 0.03506562 [[0.2921571 0.69632626 0.12525362 0.7764522 0.01523705 0.01523705 [[0. 0.9177957 0.9538997 0.2631117 0.17347999 0.05110151 [[0. 0.87111014 0.0383596 0.5882777 0.17028621 0.40024722 [[0. 0.7708371 0.31719586 0.54560775 0.17028621 0.49916053 [[0. 0.6151355 0.8990203 0.9875156 0.37386614 0.73095345 [[0. 0.79766655 0.7470136 0.79727787 0.81690913 0.7725162 [[0. 0.16327406 0.28361428 0.28361428 0.48521662 0. Looks correct? Then I have no idea how to twist it. For the second question, thank you for the suggestion! Sounds like a handy fast solution! |
Great @xuefan007 ! This means the library now runs on your computer ! By the way, thank you very much for taking the time to provide a detailed list of your computer's details. I don't have a lot of feedback from Mac users so this means a lot. |
Hi @jules-vanaret, Glad to know! I do hope this communication helps both side. :) I croped the image, plus downsized it, end up with a 80 x 80 pix, 10 slice image file (400 kb). Still the rotation function does not work at my mac. When it was 3 channels image, gives error "ValueError: too many values to unpack (expected 3)". Then I tired with only one channel, gives error "AttributeError: 'NoneType' object has no attribute 'data'" and "EmitLoopError Traceback (most recent call last)". Best, |
Hi again, I got the heavily downsized data (80x80 pix, 10 slice, 400kb file) worked with rotation function! This happend after installed tapenade (which you said the plugin stems). But the bigger file (800x800 pix, 100 mb file) still not work with rotation. |
Hi @xuefan007, sorry for the late follow-up. I'm glad that you got it working for the downsized data. Do you confirm that it works in the GUI , i.e when moving the rotation slider on the plugin interface you see your 3D (downsized) data rotating on the viewer ? If yes, what is the typical time it takes from the moment you moved the slider to the moment you see the data rotating ? This could give an idea of the time it takes for your real-sized data to compute the rotation. By the way, I see in that in one of your previous message you mention that you tried the plugin with multi-channel images. Right now the plugin is meant only for 3D data, and I have never tested it with multi-channel data, hence the errors you encountered... 😅
Best, |
Dear developer,
Thanks for the plug-in! This sounds really helpful for 3D image analysis. I shortly tried this plugin with multiple rounds ISS data for registration in napari (dot signal in 3D tissue). It works but have a problem:
Translation function works (with all x,y,z), but Rotation not work. No response with image with what ever value that been put in. This gives no error message.
I have another question related to the usage, will this plugin work for sample that have slicely change in shape? (ie.z slice have 5% difference between 2 registrated rounds). Thanks a lot!
Best wishes,
Xuefan
The text was updated successfully, but these errors were encountered: