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

« back to all changes in this revision

Viewing changes to guiqwt/tests/transform.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:
124
124
    r = get_bbox(items)
125
125
    x,y,w,h = r.getRect()
126
126
    print "Assemble test1:", w,"x", h
127
 
    dest = assemble_imageitems(items, r.getRect(), w, h, align=4, sampling=(0,))
 
127
    dest = assemble_imageitems(items, r, w, h, align=4)
128
128
    print "saving..."
129
129
    save_image("test1.png", dest)
130
130
    
131
 
    msk = np.ones( (11,11), float)
132
131
    print "Assemble test2:", w/4,"x", h/4
133
 
    dest = assemble_imageitems(items, r.getRect(), w/4, h/4, align=4, sampling=(1,msk))
 
132
    dest = assemble_imageitems(items, r, w/4, h/4, align=4)
134
133
    save_image("test2.png", dest)
135
134
 
136
135
def test():
137
136
    """Test"""
138
 
    N = 3000
 
137
    N = 500
139
138
    data = compute_image(N, N)
140
139
    m = data.min()
141
140
    M = data.max()
153
152
if __name__ == "__main__":
154
153
    # -- Create QApplication
155
154
    import guidata
156
 
    guidata.qapplication()
 
155
    _app = guidata.qapplication()
157
156
    # --    
158
157
    items = test()
159
158
    build_image(items)
 
 
b'\\ No newline at end of file'