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

average_3d_ffd segmentation fault error #13

Open
vt232 opened this issue Nov 17, 2021 · 6 comments
Open

average_3d_ffd segmentation fault error #13

vt232 opened this issue Nov 17, 2021 · 6 comments

Comments

@vt232
Copy link

vt232 commented Nov 17, 2021

Hi,
I tried running the code both on MacOS and Ubuntu, using the official MIRTK docker image as base image. In both cases I get a seg fault error during execution of the average_3d_ffd program. Seems like the issue is in the nested loop in average_3d_ffd.cc. X, Y and Z are 1 (single control point) for every forward / backward transformation pair except for the very first and the very last pairs. In particular, for the first example, the very first forward transformation from fr00 to fr01 has 29 control points, while the corresponding backward transformation has a single control point, which causes the seg fault error. What is the correct way to fix this issue?

@iimog
Copy link

iimog commented Aug 8, 2022

This is probably related to an issue in mirtk (BioMedIA/MIRTK#782). You can work around it by removing the -approximate option in the call to mirtk compose-dofs and add a call to mirtk convert-dof to combine the multiple transformations into a single one. Once the issue is solved in mirtk no workaround (except for updating mirtk) should be necessary.

iimog added a commit to BioMeDS/ukbb_cardiac that referenced this issue Sep 1, 2022
@fymobo
Copy link

fymobo commented Jul 11, 2023

This is probably related to an issue in mirtk (BioMedIA/MIRTK#782). You can work around it by removing the -approximate option in the call to mirtk compose-dofs and add a call to mirtk convert-dof to combine the multiple transformations into a single one. Once the issue is solved in mirtk no workaround (except for updating mirtk) should be necessary.

Hello there, thanks very much for your contribution. I modified the code in as you did and it works well for most of ukb data. However, I still got errors in strain analysis by MIRTK for several participants' data as follows:

MatrixToAffineParameters: Matrix is singular or very close to singular!. Error: convert-dof command returned non-zero exit status 1

Could you please help me with this issue? Thanks very much!

@iimog
Copy link

iimog commented Jul 11, 2023

I have the same problem as well in roughly 3-5% of the participants. I tried several things but was unable to fix it so far. This issue seems to be related: BioMedIA/MIRTK#758
but increasing the tolerance also did not fix it.
If you have any ideas, I'm happy to hear them.

@fymobo
Copy link

fymobo commented Jul 11, 2023

I have the same problem as well in roughly 3-5% of the participants. I tried several things but was unable to fix it so far. This issue seems to be related: BioMedIA/MIRTK#758 but increasing the tolerance also did not fix it. If you have any ideas, I'm happy to hear them.

Thanks for your reply! The strain analysis pipeline will be interrupted and no tabular result will be written when this problem is raised. Is it convenient for you to share the modified code in eval_strain_lax.py and eval_strain_sax.py to fix this problem? I really appreciate your kind help!

@iimog
Copy link

iimog commented Jul 14, 2023

Ah yes, I did not change anything there. Instead, I'm now running each participant individually. So if one fails, that does not affect the others. It also allows better parallelization. But I have to aggregate the results manually in the end.

@fymobo
Copy link

fymobo commented Jul 15, 2023

I used try-expection code block and it also worked. Thank you!!!

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

3 participants