-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix/wholebody #30
Conversation
…e values are negative when reading them from affine matrix.
@@ -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): |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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])) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto ni zorra.
There was a problem hiding this 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
Making fixes to some files in order to make whole body simulations work.