dorianps / LINDA

Lesion Identification with Neighborhood Data Analysis
Apache License 2.0
21 stars 2 forks source link

Error in Running registration: SyNCCE #22

Closed aliamani72 closed 5 years ago

aliamani72 commented 5 years ago

Dear Dorian, I newly successfully installed all the required components (R, ANTsR, ITKR..) and run LINDA v0.5.0 for a T1 image, but in the final stage it showed me the following error. Please, if possible, guide me on how to fix the error. 20:33 Creating folder: /home/aliamani/Desktop/test/linda 20:33 Loading file: t1.nii.gz ... 20:33 Loading template... 20:33 Skull stripping... (long process) 20:42 Saving skull stripped files... 20:42 Computing asymmetry mask... 20:42 Saving asymmetry mask... 20:42 1st round of prediction... 20:42 Running registration: SyN 20:44 Feature calculation 20:46 Lesion segmentation 20:47 Backprojecting prediction... 20:48 Saving prediction... 20:48 2nd round of prediction... 20:48 Running registration: SyN 20:49 Feature calculation 20:52 Lesion segmentation 20:54 Backprojecting prediction... 20:54 3rd round of prediction... 20:54 Running registration: SyNCCError in antsRegistration(fixed = img, moving = template_brain, typeofTransform = typeofTransform, : Registration failed. Use verbose mode to diagnose.

dorianps commented 5 years ago

Not exactly sure what is going on. First, try to see those mask.lesion files that are produced. If the prediction is too bad in earlier iterations that last registration will be using a mask that prevents the registration from doing its job. Another traditional issue has been the use of a flpping axis. Throughout the process we flip the image left-right to calculate some of the features. I had noticed some images from specific sites are in weird orientation so the axis of flipping which defaults to 1 actually flips up-down or anterior-posterior. You can try to check the problem with your data with something like:

img = antsImageRead('path/to/T1.nii.gz')
reflimg = reflectImage(img, axis = 1, tx = 'Affine')
antsImageWrite('/path/to/output.nii.gz')

Then open the original image in ITKsnap and add the new output.nii.gz as additional file. See if they are simply left-right flipped.

Last option is some memory limitation in your system. You can re-run LINDA with verbose=2 to hopefully get more verbose output from the registration.

Hope it helps.

dorianps commented 5 years ago

Assuming resolved. Closing issue, reopen if necessary.