jonclayden/RNiftyReg

Provide interrupt abilities?

Closed this issue · 3 comments

@jonclayden Thanks for your fabulous package, and congrats on your supremely clean code - it is indeed most impressive! I've written a package which depends on RNiftyReg, and uses it to rectify images of maps. My package is currently under review for rOpenSci, and a reviewer (ping @potterzot) noted that there is no way to interrupt the function, and furthermore that it did not exit cleanly (maybe extending from #3). I have no reproducible code for the latter claim, but would nevertheless like to ask whether you might incorporate an interrupt function?

It seems, from my crude perusal, that you could just include <R.h> in your _reg_aladin.cpp, and then just use if (l % 1000 == 0) R_CheckUserInterrupt() or something like that. Would that be possible?

Hi! The ability to interrupt registration in this way was added in v2.3.0, but it looks like this may have been accidentally undone (for linear registration in particular) during an upstream update since then. I will look into it.

This should now be resolved. Thanks for the report!

Thanks for the really quick response - nice work!