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

Fix/wholebody #30

Merged
merged 3 commits into from
Apr 1, 2024
Merged

Fix/wholebody #30

merged 3 commits into from
Apr 1, 2024

Conversation

YerePhy
Copy link
Collaborator

@YerePhy YerePhy commented Mar 26, 2024

Making fixes to some files in order to make whole body simulations work.

@@ -222,14 +226,14 @@ def join_beds_wb(recons_beds, joint_beds):

bed_0_data = bed_0_data[:, :, :-slices_to_remove]

for i in range(1, len(recons_beds) - 1):
Copy link
Collaborator Author

@YerePhy YerePhy Mar 26, 2024

Choose a reason for hiding this comment

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

@txusser Aquí parece que hacía una iteración menos de la q toca, porque range(a, b) va de a a b-1.

Copy link
Owner

Choose a reason for hiding this comment

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

Esto me lo tengo que mirar mas en detalle mañana. Parece a priori que es una burna correccion

Copy link
Owner

Choose a reason for hiding this comment

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

No lo he probado pero me fío si decís que había un error.

@@ -243,7 +247,7 @@ def join_beds_wb(recons_beds, joint_beds):
hdr1.set_data_dtype(dtype)
hdr1.set_data_shape(bed_0_data.shape)
affine = bed_0.get_affine()
hdr1.set_zooms((affine[0, 0], affine[1, 1], affine[2, 2]))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@txusser Creo q los valores de la affine pueden tener signatura, de hecho en algunos experimentos que hemos hecho con Pablo affine[0, 0] era negativo. Hemos puesto abs para coger el tamaño de voxel sin signatura, confírmanos si esto es válido o deberíamos quitar el abs, gracias.

Copy link
Owner

Choose a reason for hiding this comment

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

Claro q pueden ser negavitos. Los signos indican la orientación de la imagen http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm Habría que conservarlo, a no ser que la función dé error si son negativos, cosa de la que no estoy seguro. En principio nunca ha dado problemas

Copy link
Owner

Choose a reason for hiding this comment

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

Aparentemente, no es el caso. la función set_zooms no admite negativos, así que ok a este cambio.

Copy link
Owner

Choose a reason for hiding this comment

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

Esto ni zorra.

Copy link
Owner

@txusser txusser left a comment

Choose a reason for hiding this comment

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

Reviewed and approved. The changes in the wb_utils function to merge the beds should be further tested

@txusser txusser merged commit 5ca9a77 into develop Apr 1, 2024
1 check passed
@txusser txusser deleted the fix/wholebody branch April 1, 2024 09:00
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

Successfully merging this pull request may close these issues.

2 participants