def test_user_given_cmap_with_colorbar(): img = load_mni152_template() oslicer = OrthoSlicer(cut_coords=(0, 0, 0)) # Test with cmap given as a string oslicer.add_overlay(img, cmap='Paired', colorbar=True) oslicer.close()
def test_demo_ortho_slicer(): # This is only a smoke test oslicer = OrthoSlicer(cut_coords=(0, 0, 0)) img = load_mni152_template() oslicer.add_overlay(img, cmap=plt.cm.gray) oslicer.title("display mode is ortho") oslicer.close()
def test_demo_ortho_slicer(): # This is only a smoke test mp.use('template', warn=False) import pylab as pl pl.switch_backend('template') pl.clf() oslicer = OrthoSlicer(cut_coords=(0, 0, 0)) img = load_mni152_template() oslicer.add_overlay(img, cmap=pl.cm.gray) oslicer.close()
def test_demo_ortho_slicer(): # This is only a smoke test mp.use('template', warn=False) import matplotlib.pyplot as plt plt.switch_backend('template') plt.clf() oslicer = OrthoSlicer(cut_coords=(0, 0, 0)) img = load_mni152_template() oslicer.add_overlay(img, cmap=plt.cm.gray) oslicer.close()
def test_data_complete_mask(): """This special case test is due to matplotlib 2.1.0. When the data is completely masked, then we have plotting issues See similar issue #9280 reported in matplotlib. This function tests the patch added for this particular issue. """ # data is completely masked data = np.zeros((10, 20, 30)) affine = np.eye(4) img = nibabel.Nifti1Image(data, affine) oslicer = OrthoSlicer(cut_coords=(0, 0, 0)) oslicer.add_overlay(img) oslicer.close()
def test_demo_ortho_slicer(): # This is only a smoke test oslicer = OrthoSlicer(cut_coords=(0, 0, 0)) img = load_mni152_template() oslicer.add_overlay(img, cmap=plt.cm.gray) oslicer.close()
def test_user_given_cmap_with_colorbar(img): """Test cmap provided as a string with ``OrthoSlicer``.""" oslicer = OrthoSlicer(cut_coords=(0, 0, 0)) oslicer.add_overlay(img, cmap='Paired', colorbar=True) oslicer.close()