natverse / nat.templatebrains

Support for 3D template brains used as targets for image registration
https://natverse.org/nat.templatebrains/
GNU General Public License v3.0
3 stars 0 forks source link

Uninformative error from CMTK with kcs20 example #38

Closed r-shruthi11 closed 5 years ago

r-shruthi11 commented 5 years ago

I'm trying to replicate the example that accompanies the xform_brain documentation here: https://www.rdocumentation.org/packages/nat.templatebrains/versions/0.9/topics/xform_brain and when I try to execute xform_brain(kcs20, sample=FCWB, reference=JFRC2, .progrexx='text) I see this error Error in cmtk.streamxform(points,reg,direction,transformtype): Error running CMTK streamxform! Please advice on how to proceed since this error is uninformative and doesn't tell me where the function seems to be failing

jefferis commented 5 years ago

Hmm, I agree that the message could be better since I can’t immediately guess its origin. However I do see that you have a typo in the .progress argument. Should end in ss not xx.

jefferis commented 5 years ago

Can I check if you have actually installed CMTK? What does cmtk.bindir() return?

r-shruthi11 commented 5 years ago

Sorry, this was a typo in my comment, the command in R itself spelled progress appropriately. cmtk.bindir() returns "C:\\cygwin64\\usr\\local\\lib\\cmtk\\bin"

jefferis commented 5 years ago

Ok. Can you tell me what you get from cmtk.dof2mat(version = TRUE). This actually checks if one of the CMTK tools can be run.

r-shruthi11 commented 5 years ago

This command gave me an error. I reinstalled CMTK and that seems to have solved the issue. Thanks a lot for the help!

jefferis commented 5 years ago

Great! I think that in the circumstances the error message was not far off – the CMTK tool could not be run. We could maybe look into some kind of function that can check the CMTK setup. @SridharJagannathan perhaps we could make a function like natverse::dr_nat that checks if CMTK is installed and runnable and perhaps looks at other things like whether bridging registrations have been downloaded etc.