dorianps / LINDA

Lesion Identification with Neighborhood Data Analysis
Apache License 2.0
20 stars 4 forks source link

Error in skull stripping step #23

Closed reborn781025 closed 4 years ago

reborn781025 commented 5 years ago

Dear Dorian,

I just newly started using LINDA v0.5.0 with ANTsRCore v0.7.0 and ANTsR v0.4.9. However, I encountered the following error:

Skull stripping... (long process)Error in if (is.na(mask)) { : argument is not interpretable as logical

Could you please help me with how to fix this error? Thank you.

Best, Rita

dorianps commented 5 years ago

This used to work, so the only thing I can think of is some recent change in ANTsR. Are both software the most recent (LINDA, ANTsR and ANTsRCore)?

reborn781025 commented 5 years ago

Hi,

I believe they are all the most recent versions. By the way, I was running it using RStudio version 1.1.463 but I saw the same error when I tried R version 3.5.2

Would you suggest that I post this issue on ANTsR site? Or would you look into this issue?

Many thanks, Rita

dorianps commented 5 years ago

I need to look into this. If you can send me your mprage that would be helpful, just in case the data is the problem, otherwise I will use another test mprage.

On Fri, Jul 19, 2019, 10:53 AM reborn781025 notifications@github.com wrote:

Hi,

I believe they are all the most recent versions. By the way, I was running it using RStudio version 1.1.463 but I saw the same error when I tried R version 3.5.2

Would you suggest that I post this issue on ANTsR site? Or would you look into this issue?

Many thanks, Rita

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dorianps/LINDA/issues/23?email_source=notifications&email_token=ACFJU7I33IAH6FLDKKNOZBTQAHIPTA5CNFSM4IFENMB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2L3VTY#issuecomment-513260239, or mute the thread https://github.com/notifications/unsubscribe-auth/ACFJU7JDBZWA3LOEZ2XSJS3QAHIPTANCNFSM4IFENMBQ .

reborn781025 commented 5 years ago

Thanks a lot for looking into this. Could you provide me your email? I tested two datasets and encountered the same error. I will send you two mprage from two datasets.

dorianps commented 5 years ago

Ok, I ran LINDA on linux, older installation and works fine. Here is the native segmentation for TP2.

Prediction3_native.nii.gz

The error you show above (argument is not interpretable as logical) came up yesterday during Travis tests for LESYMAP as well, but only for OSX. I don't know yet what is wrong with the OSX installation of ANTsR. Can you confirm if you also encountered the problem on an Apple computer?

I may open an ANTsR issue later to ask @stnava and other developers where is this coming from. In my code, the error comes when I check is.na(mask) where mask can be an antsImage or default NA. The LINDA code has not changed, so it's either changes in ANTsR or something weird happening on OSX.

reborn781025 commented 5 years ago

Yes, I ran ANTsR and LINDA in R using an iMac and saw the error comes from is.na(mask). Are you implying it may work if I use Windows system? I could probably give it a try and let you know if it works. Thanks.

dorianps commented 5 years ago

Thanks for confirming.

It should work on Linux, whether native or Windows subsystem. There is no native ANTsR for Windows.

reborn781025 commented 5 years ago

Thank you for your information. Please let me know if you get the solution. Thanks again.

dorianps commented 5 years ago

Rita, turns out the problem is a change in ANTsR, it has nothing to do with Apple computers. I will need to change some code to resolve the issue, will let you know when is done.

Meanwhile, if you are in a hurry you could get away with installing ANTsRCore and ANTsR from at least 1 month older.

reborn781025 commented 5 years ago

Dorian, I sincerely appreciate all your prompt responses and investigation.

dorianps commented 5 years ago

You are welcome. The problem arises from ANTsR and needs to be fixed there. The temporary solution for you is to use an ANTsRCore commit from last month. I tested this solution and worked with your TP2 example. From a shell prompt:

git clone https://github.com/ANTsX/ANTsRCore.git
cd ANTsRCore
git checkout 25f0f8a469950f3c66ece4c2632bb15d30cea8de
R CMD INSTALL .

We are discussing this problem in an open ANTsR issue, you can check there for a more permanent solution https://github.com/ANTsX/ANTsR/issues/274

dorianps commented 4 years ago

This error was fixed in ANTsR back in July, closing issue.