[Insight-users] Wrapping R with SimpleITK

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Jan 25 08:56:15 EST 2012


Hello,

This is really great there is so much interested in this! I am quite surprised at how popular R is.

A summary of the state of SimpleITK and R:

SimpleITK is rapidly progressing with it's typeless image layer and procedural or object oriented interface to ITK. This approach make the interface free from templates, and follows the principle of encapsulation of the lower level ITK api. This makes wrapping the interface with SWIG fairly trivial, and R is a language that swig supports.

To enable SimpleITK with R, you should disable all other wrapping languages, and just enable WRAP_R.  I have hacked together a couple of changes I needed to get the R tests to run: http://review.source.kitware.com/#/c/3735/

To load SimpleITK into R you need to run something like the following:

	dyn.load( file.path( "/scratch/blowekamp/build/SimpleITK/lib", paste("SimpleITK", ".so", sep="") ) )
	source( file.path( "/scratch/blowekamp/build/SimpleITK/SimpleITK-build/Wrapping", "SimpleITK.R" ) )
	cacheMetaData(1)

There has been very little customization done for R so we are likely not meeting many standard conventions. And packaging for R is rather problematic in the latest version.

Machine performing nightly build with R are very much appreciated:
http://www.itk.org/SimpleITKDoxygen/html/Developer.html

Good luck,
Brad
========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120125/4c86cf1c/attachment.htm>


More information about the Insight-users mailing list