vtkSegmentation data to niftii conversion

This thread may help, see here.