# Proposals:Integration with R Language

From KitwarePublic

Jump to navigationJump to search
# Background

This page hosts discussions on how to integrate functionalities of ITK with **R** language (http://www.r-project.org/)

A reference for this effort is the integration of **R** in the Titan package (based on VTK).

https://www.kitware.com/InfovisWiki/index.php/R_Titan_Integration

# Use Cases

- Statistical Segmentation of Images
- Multi-modality segmentation

- Statistical Analysis of features extracted from images
- Group registration
- Atlas based segmentation

- Segmentation of Images/Volumes using ITK
- Multi-dimensional array(s) pre-existing in
**R** - Results are passed back into
**R** - Visualization of results in ITK (through
**R**?)

- Multi-dimensional array(s) pre-existing in
- Registration of Images/Volumes using ITK
- Multi-dimensional array(s) pre-existing in
**R** - Results are passed back into
**R** - Visualization of results in ITK (through
**R**?)

- Multi-dimensional array(s) pre-existing in

# Suggested Implementations

## Data Bridge

Making some ITK data structures visible from **R** by converting or adapting them to **R** vectors. And conversely, adapting **R** vectors into ITK data structures.

### Candidate ITK classes

- itk::FixedArray (and derived classes)
- itk::Point
- itk::Vector
- itk::Index
- itk::Offset
- itk::CovariantVector
- itk::RGBPixel
- itk::RGBAPixel

- itk::VariableLenghtVector
- itk::Matrix
- itk::Containers
- itk::VectorContainer
- itk::MapContainer

- itk::Image
- itk::PixelContainer

- itk::Sample
- itk::KdTree

### Candidate STL classes

- STL Containers
- std::list
- std::queue
- std::map
- std::set

## Wrapping (WrapITK)

Adapting the wrapping process of WrapITK in order to expose ITK functionalities from R.