@skipif((not has_qt))
def test_line_profile():
 plugin = setup_line_profile(data.camera())
 (line_image, scan_data) = plugin.output()
 for inp in [line_image.nonzero()[0].size, (line_image.sum() / line_image.max()), scan_data.size]:
  assert_equal(inp, 172)
 assert_equal(line_image.shape, (512, 512))
 assert_allclose(scan_data.max(), 0.9176, rtol=0.001)
 assert_allclose(scan_data.mean(), 0.2812, rtol=0.001)

@ skipif ( ( not has_qt ) ) def test_line_profile ( ) : plugin = setup_line_profile ( data . camera ( ) ) ( line_image , scan_data ) = plugin . output ( ) for inp in [ line_image . nonzero ( ) [ 0 ] . size , ( line_image . sum ( ) / line_image . max ( ) ) , scan_data . size ] : assert_equal ( inp , 172 ) assert_equal ( line_image . shape , ( 512 , 512 ) ) assert_allclose ( scan_data . max ( ) , 0.9176 , rtol = 0.001 ) assert_allclose ( scan_data . mean ( ) , 0.2812 , rtol = 0.001 )
test a line profile using an ndim=2 image .