dorianps / LINDA

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

antsRegistration failed (3rd Registration) #7

Closed FedeliD closed 5 years ago

FedeliD commented 6 years ago

Hi, I'm quite new to Linda. Even if I'm not an experienced user I'm really facinated by this tool: it looks truly amazing and definitely deserves to be used in many clinical studies. I've successfully installed all the required components (R, ANTsR, ITKR..) and I'm currently running Linda 0.2.7 (full version, not GitHub's one) on a Linux Virtual Machine (VBOX) in my WIndows10 pc. I've tried to run Linda on a couple of post-stroke subjects, but this error keeps happening:

Enter file name: t1.nii
17:26 Loading file: t1.nii 
17:26 Creating folder: ./linda 
17:26 Loading template... 
17:27 Skull stripping... (long process) 
 bad det -1 v -1 u 1
 bad det -1 v -1 u 1 new 1
 bad det -1 v -1 u 1
 bad det -1 v -1 u 1 new 1
17:40 Saving skull stripped files 
17:41 Loading LINDA model 
17:41 Computing asymmetry mask... 
17:43 Saving asymmetry mask... 
17:43 Running 1st registration... 
17:47 Feature calculation... 
17:50 Running 1st prediction... 
17:52 Saving 1st prediction... 
17:52 Backprojecting 1st prediction... 
17:52 Running 2nd registration... 
17:57 Feature calculation... 
18:01 Running 2nd prediction... 
18:03 Saving 2nd prediction... 
18:03 Backprojecting 2nd prediction... 
18:03 Running 3rd registration... (long process)
Error in antsRegistration(fixed = simg, moving = tempbrain, typeofTransform = "SyNCC",  : 
  Registration failed. Use verbose mode to diagnose.

Have you any clue on why is this happening? Is there a problem with Linda or maybe is it related to ANTs/ANTsR? Thank you for your time and support, any help will be really appreciated. By the way the output images (even if they're not the final ones) look really good and there's a good match with the actual brain lesion.

Best FedeliD

dorianps commented 6 years ago

Hi @FedeliD , thank you for using Github to post the issue.

This is new problem I have never seen before. It comes from antsRegistration in ANTsR, not from LINDA itself. The strange thing is that the first 2 registrations use 'SyN', while the failing one uses 'SyNCC. I can see some recent changes in antsRegistration in the last month or so, but ANTsR developers can understand better what is the problem.

Please do me a favor and open an ANTsR issue showing the same problem. Tell them the first two registrations are 'SyN' while the last is 'SyNCC'. If we are lucky they may understand the problem simply by the symptom. But it might well be that either the images are needed or a good run in verbose mode. If that is case, you can either try to run linda_predict.R commands one by one until that third registration, or send me the T1 so I can try it on my computer and get the debug information. Either way this is better in the ANTsR issues.

Just to exclude a potential problem, is the lesion on this patient too large by any chance? The only thing I can think now is that perhaps there aren't enough samples in the image.

Try also to post screenshots of those intermediate images you said worked well.

Dorian

FedeliD commented 6 years ago

Thank you Dorian for your quick and detailed answer! Unfortunately I'm not allowed to share the patient's image on a public website, but I'm sharing screenshots of the brain both unmasked and masked (mask.lesion3). The lesion in the left hemisphere is very large indeed, but the mask fits pretty well (good job, Linda!). I'm opening an Issue in ANTsR as you suggested. Thank you for your really kind support. Davide t1 t1_masked