Segmentation based on rgb threshold + examples

This is a script I've been sitting on as a part of scilpy. Now that it's mature enough and could be useful, we decided to submit it as an example for the gallery.

There are two (in fact three) parts to this : First, an example of segmenting the corpus callosum from a dwi given a threshold and a region to search in. This relies on two function, one that computes the cfa from raw a dwi, and another that segment the cfa based on a localisation and a threshold on the rgb values.

The example included is for the corpus callosum, but it could be easily extented to segment for example the cortico spinal tract, givne a high threshold on the blue component and a mask comprising two boxes on the left and right side of the brain, but that's for later.