ANTsX / ITKR

port of ITK to R
6 stars 14 forks source link

Failing on ITKR when running LINDA #62

Open ramBrain opened 1 year ago

ramBrain commented 1 year ago

Dear all,

I am trying to run LINDA from R, but this is what happens:

16:49 Starting LINDA v0.5.1
16:49 Creating folder: /mnt/d/<pathtosub>/sub-005/linda
16:49 Loading file: sub-005_ses-01_T1w_3D.nii ...
16:49 Loading template...
16:49 Skull stripping... (long process)/home/ramtin/ITKR/src/itks/Modules/IO/TransformBase/src/itkTransformFileWriterSpecializations.cxx:159:
ITK ERROR: TransformFileWriterTemplate(0x5590f9de3740): Could not create Transform IO object for writing file /tmp/RtmptlQNam/antsr24725103c3cf_InitialAff.mat
  There are no registered Transform IO factories.
  Please visit https://www.itk.org/Wiki/ITK/FAQ#NoFactoryException to diagnose the problem.

Transform file does not exist: /tmp/RtmptlQNam/antsr24725103c3cf_InitialAff.mat
Error in antsRegistration(tem, img, typeofTransform = regtype, initialTransform = initafffn,  : 
  Registration failed. Use verbose mode to diagnose.
Calls: linda_predict ... n4_skull_strip -> do.call -> <Anonymous> -> antsRegistration
Execution halted

I am on Ubuntu 22.04.1 LTS (under WSL2).

Any clue?

Thank you in advance, Ramtin

mark-vernon commented 1 year ago

I'm experiencing the same issue. I've tried editing the ITKR/src/itkb/ITKConfig.cmake file to include the ITKImageIO and ITKTransformIO factories but when I try installing ITKR via "R CMD INSTALL ITKR" command, it simply pulls down the original ITKConfig.cmake file and my changes are lost. Is there another way to have the ITKR installer include these two factories as well? Thanks!

ncullen93 commented 9 months ago

You should edit the configure file - that is what determines how ITK is built. See here https://github.com/stnava/ITKR/blob/01d69c430c21b335fb860402eda6f14954dd52cb/configure#L74C1-L100C41 .

So maybe adapting a line like -DModule_ITKReview:BOOL=ON.