adapted visualization.py for direct file loading with nibabel