-
Notifications
You must be signed in to change notification settings - Fork 32
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
cannot access tutorial on how to determine when to use nonrigid alignment in 3D reconstruction. #297
Comments
I have clicked "3D reconstruction with pairwise alignment", but 404 page not found. Thanks. |
Hi @yuling999666, apologies, the current link is indeed invalid. You can refer to this page instead, and we will update it as soon as possible. Regarding when to use non-rigid alignment in 3D reconstruction, my opinion is that if a slice is significantly different from both the previous and the next slices, it may indicate the need for non-rigid alignment to restore its original shape. You can use the As for how to perform non-rigid alignment, we generally use two approaches. Suppose the aligned slices from previous pairwise rigid alignment are stored in
spatial_key = 'align_spatial'
key_added = 'align_spatial_stage2'
neighbor_size = 1 # neighborhood size to concat
cur_idx = 1 # the slice that need to use nonrigid alignment
min_idx = max(0, cur_idx - neighbor_size)
max_idx = min(cur_idx + neighbor_size + 1, len(slices))
reference_neighbor_slices = ad.concat([aligned_slices[i] for i in range(min_idx,max_idx) if i != cur_idx])
transformed_slice = aligned_slices[cur_idx]
cur_aligned_slices, _= st.align.morpho_align(
models=[reference_neighbor_slices, transformed_slice],
spatial_key=spatial_key,
key_added=key_added,
device=device,
rep_layer='X_pca',
rep_field='obsm',
dissimilarity='cos',
# parameters that related to nonrigid
beta=1e-1,
lambdaVF=1e1,
K = 50,
)
st.pl.overlay_slices_2d(slices = cur_aligned_slices, spatial_key = spatial_key, height=4, overlay_type='backward')
st.pl.overlay_slices_2d(slices = cur_aligned_slices, spatial_key = key_added + '_nonrigid', height=4, overlay_type='backward') If the result is improved, you can insert the results into original slice:
The related content will also be updated in the tutorial soon. I hope this helps! |
Thanks for clarification. It really helps a lot! |
Hi Yifan, one more question. When you did 3D reconstruction in figure 3 for human metastatic lymph node, did you use non-rigid alignment? Thanks. |
Hi @yuling999666, I think we didn't use the nonrigid alignment for 3D reconstruction for human metastatic lymph node dataset |
Thanks for quick response. I appreciate it. |
The text was updated successfully, but these errors were encountered: