@skipif((not has_qt))
def test_line_profile_rgb():
 plugin = setup_line_profile(data.chelsea(), limits=None)
 for i in range(6):
  plugin.line_tool._thicken_scan_line()
 (line_image, scan_data) = plugin.output()
 assert_equal(line_image[(line_image == 128)].size, 750)
 assert_equal(line_image[(line_image == 255)].size, 151)
 assert_equal(line_image.shape, (300, 451))
 assert_equal(scan_data.shape, (151, 3))
 assert_allclose(scan_data.max(), 0.772, rtol=0.001)
 assert_allclose(scan_data.mean(), 0.4359, rtol=0.001)

@ skipif ( ( not has_qt ) ) def test_line_profile_rgb ( ) : plugin = setup_line_profile ( data . chelsea ( ) , limits = None ) for i in range ( 6 ) : plugin . line_tool . _thicken_scan_line ( ) ( line_image , scan_data ) = plugin . output ( ) assert_equal ( line_image [ ( line_image == 128 ) ] . size , 750 ) assert_equal ( line_image [ ( line_image == 255 ) ] . size , 151 ) assert_equal ( line_image . shape , ( 300 , 451 ) ) assert_equal ( scan_data . shape , ( 151 , 3 ) ) assert_allclose ( scan_data . max ( ) , 0.772 , rtol = 0.001 ) assert_allclose ( scan_data . mean ( ) , 0.4359 , rtol = 0.001 )
test a line profile using an ndim=3 image .