Beispiel #1
0
def test_plot_prob_atlas():
    affine = np.eye(4)
    shape = (6, 8, 10, 5)
    rng = np.random.RandomState(0)
    data_rng = rng.normal(size=shape)
    img = nibabel.Nifti1Image(data_rng, affine)
    # Testing the 4D plot prob atlas with contours
    display = plot_prob_atlas(img, view_type='contours')
    # Testing the 4D plot prob atlas with contours
    display = plot_prob_atlas(img, view_type='filled_contours', threshold=0.2)
    # Testing the 4D plot prob atlas with contours
    display = plot_prob_atlas(img, view_type='continuous')
Beispiel #2
0
def test_plot_prob_atlas():
    affine = np.eye(4)
    shape = (6, 8, 10, 5)
    rng = np.random.RandomState(0)
    data_rng = rng.normal(size=shape)
    img = nibabel.Nifti1Image(data_rng, affine)
    # Testing the 4D plot prob atlas with contours
    display = plot_prob_atlas(img, view_type='contours')
    # Testing the 4D plot prob atlas with contours
    display = plot_prob_atlas(img, view_type='filled_contours',
                              threshold=0.2)
    # Testing the 4D plot prob atlas with contours
    display = plot_prob_atlas(img, view_type='continuous')
Beispiel #3
0
def test_plot_prob_atlas():
    affine = np.eye(4)
    shape = (6, 8, 10, 5)
    rng = np.random.RandomState(42)
    data_rng = rng.normal(size=shape)
    img = nibabel.Nifti1Image(data_rng, affine)
    # Testing the 4D plot prob atlas with contours
    plot_prob_atlas(img, view_type='contours')
    plt.close()
    # Testing the 4D plot prob atlas with contours
    plot_prob_atlas(img, view_type='filled_contours', threshold=0.2)
    plt.close()
    # Testing the 4D plot prob atlas with contours
    plot_prob_atlas(img, view_type='continuous')
    plt.close()
    # Testing the 4D plot prob atlas with colormap
    plot_prob_atlas(img, view_type='filled_contours', colorbar=True)
    plt.close()
    # threshold=None
    plot_prob_atlas(img, threshold=None)
    plt.close()