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

Lung_Atlas/copd01_iBHCT_Both_Lung_Mask.mha #2

Open
meruicecream opened this issue Oct 28, 2021 · 5 comments
Open

Lung_Atlas/copd01_iBHCT_Both_Lung_Mask.mha #2

meruicecream opened this issue Oct 28, 2021 · 5 comments

Comments

@meruicecream
Copy link

Hello,I am interested in your article and your idea is awesome. But i have some problems with debuging your codes, in do_elastix_registration.py, where_to _run is set to 'local' . I use a way to finish lungs segmentation,but what is the Lung_Atlas/copd01_iBHCT_Both_Lung_Mask.mha? It confuses me a lot because it seems that there is nothing about lung atlas in chest_segmentation.py.
Looking forward to your reply at your earliest convenience.

@hsokooti
Copy link
Owner

Hello,

Thank you for your interest in our article.

The Lung_Atlas is a combination of the "ptpulmo" software plus an atlas-based segmentation. I will update the DOC to make this more clear. There is no significant difference in the results. All in all, even a primitive segmentation would suffice for this purpose. You might just need to rename your lung masks in order to perform other steps.

@meruicecream
Copy link
Author

I am confused about function ncmi in multi_registrations.py. When runing ut.ncmi(setting, cn=cn), error occurs that ### "unrecognized setting images". As far as my concerned, 128 line in multi_registrations.py, config_str = 'images=' + su.address_generator(setting, 'Im', cn=cn, type_im=0) + ' ' + \ su.address_generator(setting, 'nonRigid_MovedImage', cn=cn, out=0) + '\n' , it should be 'image=' rather than 'images='(I guess).
After changing this code, it seems that there is no output such as pooled_NCMI_r0.bin in result folder? It prevents me from running uncertainty.py, so how to solve this problem?
What's more , i am interested in calculating MIND and CVH features, Could you please give me any help or any guide?
Looking forward to your reply at your earliest convenience.THANKS A LOT!!!

@hsokooti
Copy link
Owner

That is correct indeed. The argument should be 'image'. If you do not mind, please commit the correction for that line, otherwise, I can update that line.

About the NCIM.exe, could you run the standalone app in your windows command prompt and check if it is working. Are you able to run Pooling.exe without any issue?

About the MIND feature, that was computed in MATLAB. I used a modified kernel from the original MIND implementation at mpheinrich.de. I added the modified kernel (search_region_h.m) to the repository.

The CVH feature was also computed in MATLAB. I guess an equivalent method like numpy .histogram2d would generate the same results.

@meruicecream
Copy link
Author

I am sorry to bother you again.Unfortunately,I run the standalone app in windows command prompt ,but it only shows that 'loading image has done',as is shown in the figure.
image
It seems that there is no output such as pooled_NCMI_r0.bin in result folder? I don't know how to solve this problem.
image
What's more, in uncertainty.py, ants_loss.plot_loss(setting, cn_list=np.arange(1, 11), exp_list=exp_loss, out=0), some error occur. In do_elastix_registration.py, 'where to run' is set to 'local' rather than 'sharkCluster', so there is no 'jobOut' in nonrigid_folder resulting in error in loss function,how to handle this issue.
image
Thank you very much for giving me a lot of help.Looking forward to your reply at your earliest convenience!

@hsokooti
Copy link
Owner

About the NCIM.exe, I guess there might be then some problems with the image header (size, spacing). I cannot regenerate the error on my workstation. Are you using this app for the DIR-Lab images? Could you try it on other images just to verify that you get the same error? Later, I will add a unit test with a phantom image.

The function ants_loss.plot_loss() only is uese for visualization purposes. If you would like to run registrations locally, you could store the local log file as well. Maybe the function set_log_file() can be helpful. After storing all log files in a same directory, I expect that ants_loss.plot_loss() should run without any issues.

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