Added conversion function for ROI data structures

Handling of ROI can be made using different kinds of data structures,
namely a 4D array, a list of 3D arrays, and a 3D array of labels.
Conversion functions between these formats have been written (six
functions).