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

How to get the transformation matrix? #24

Open
gmh1033286494 opened this issue Dec 10, 2020 · 3 comments
Open

How to get the transformation matrix? #24

gmh1033286494 opened this issue Dec 10, 2020 · 3 comments

Comments

@gmh1033286494
Copy link

Hi, I'm trying to do the image registration for large WSI on the lower level which is faster. Then, I want to apply the transformation matrix back to Level 1 in order to registrar the original WSI. So how can I get the transformation matrix after I've done the registration.
Thank you very much. Looking forward to your advice.

@jlevy44
Copy link
Owner

jlevy44 commented Dec 18, 2020

Hey sorry to have missed this issue; I believe you're looking for this, yes?
https://github.com/jlevy44/PathFlow-MixMatch/blob/master/pathflow_mixmatch/cli.py#L198

@jlevy44 jlevy44 reopened this Dec 18, 2020
@gmh1033286494
Copy link
Author

gmh1033286494 commented Dec 20, 2020

Hey sorry to have missed this issue; I believe you're looking for this, yes?
https://github.com/jlevy44/PathFlow-MixMatch/blob/master/pathflow_mixmatch/cli.py#L198

I think I got the matrix by letting the def affine_register return the transformation.transformation_matrix. I don't know whether I did it right. I am trying to apply this matrix to the level 0 of my original WSI.
What I am working on is to perform image registration with 2 80000120000 size WSI. Now I can only use pathflow-mixmatch with --no segement analysis True. If I turn it off, it will show error: n_components=4 must be between 0 and min(n_samples, n_features)=2 with svd_solver='full'.
According to your code I think with --no segement analysis False, there will be some difference on the results and the proccessing speed.
I am now using level 5 5000
7000 size with iterration 1000. This will take about 5 minutes with GPU. I am just wondering I can use a larger level and spend less time with --no segement analysis False

@jlevy44
Copy link
Owner

jlevy44 commented Feb 23, 2021

..If the image is from #26 , you'll probably want to run it with no_segment_analysis set to true... You could also think about downsampling the image, extracting the transformation matrix and/or transformation parameters, then upsampling the displacement field or applying the parameters on the entire matrix, but this would be for a coarse alignment. The nonlinear deformations allow for pyramidal upsampling of the displacement so as to fine-tune them though requires particular attention to the upsampling and kernel parameters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants