vispy.visuals.tests.test_volume module#

vispy.visuals.tests.test_volume.test_all_render_methods(method_name)#

Test that render methods don’t produce any errors.

vispy.visuals.tests.test_volume.test_changing_cmap()#

Test that changing colormaps updates the display.

vispy.visuals.tests.test_volume.test_equal_clims(texture_format)#

Test that equal clims produce a min cmap value.

vispy.visuals.tests.test_volume.test_minip_cutoff()#

Ensure fragments are properly discarded based on the minip_cutoff for the minip rendering method

vispy.visuals.tests.test_volume.test_mip_cutoff()#

Ensure fragments are properly discarded based on the mip_cutoff for the mip and attenuated_mip rendering methods

vispy.visuals.tests.test_volume.test_plane_depth()#
vispy.visuals.tests.test_volume.test_set_data_changes_shape()#
vispy.visuals.tests.test_volume.test_set_data_does_not_change_input()#
vispy.visuals.tests.test_volume.test_volume()#
vispy.visuals.tests.test_volume.test_volume_bounds()#
vispy.visuals.tests.test_volume.test_volume_clims_and_gamma(texture_format, input_dtype, clim_on_init)#

Test volume visual with clims and gamma on shader.

Test is parameterized based on texture_format and should produce relatively the same results for each format.

Currently just using np.ones since the angle of view made more complicated samples challenging, but this confirms gamma and clims works in the shader. The VolumeVisual defaults to the “grays” colormap so although we compare data using RGBA arrays, each R/G/B channel should be the same.

vispy.visuals.tests.test_volume.test_volume_depth()#

Check that depth setting is properly performed for the volume visual

Render a volume with a blue ball in front of a red plane in front of a blue plane, checking that the output image contains both red and blue pixels.

vispy.visuals.tests.test_volume.test_volume_draw()#
vispy.visuals.tests.test_volume.test_volume_set_data_different_dtype()#