~ubuntu-branches/ubuntu/trusty/guiqwt/trusty

« back to all changes in this revision

Viewing changes to guiqwt/tests/imagefilter.py

  • Committer: Bazaar Package Importer
  • Author(s): Picca Frédéric-Emmanuel
  • Date: 2011-04-07 22:41:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110407224150-kkhppnq7rp2c8b3c
Tags: 2.1.0-1
* Imported Upstream version 2.1.0
* debian/patches/
  - 0001-features-01_bts614083.patch (delete)
  - 0001-feature-fix-the-documentation-build.patch (new)
* add and install the sift desktop file
* recommends python-dicom (Closes: #621421)
  thanks Junqian Gordon Xu for the report

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    """Test"""
34
34
    # -- Create QApplication
35
35
    import guidata
36
 
    guidata.qapplication()
 
36
    _app = guidata.qapplication()
37
37
    # --
38
38
    from guiqwt.tests.imagexy import compute_image
39
39
    x, y, data = compute_image()
42
42
    import os.path as osp, numpy as np
43
43
    from guiqwt.io import imagefile_to_array
44
44
    filename = osp.join(osp.dirname(__file__), "brain.png")
45
 
    data = imagefile_to_array(filename)
 
45
    data = imagefile_to_array(filename, to_grayscale=True)
46
46
    x = np.linspace(0, 30., data.shape[1])
47
47
    y = np.linspace(0, 30., data.shape[0])
48
48
    imshow(x, y, data, filter_area=(10, 20, 5, 15))