{"action":"created","issue":{"url":"https://api.github.com/repos/silx-kit/silx/issues/478","repository_url":"https://api.github.com/repos/silx-kit/silx","labels_url":"https://api.github.com/repos/silx-kit/silx/issues/478/labels{/name}","comments_url":"https://api.github.com/repos/silx-kit/silx/issues/478/comments","events_url":"https://api.github.com/repos/silx-kit/silx/issues/478/events","html_url":"https://github.com/silx-kit/silx/issues/478","id":196925687,"number":478,"title":"addImage with negative scaling breaks the mask tool","user":{"login":"alexbjorling","id":20105820,"avatar_url":"https://avatars.githubusercontent.com/u/20105820?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbjorling","html_url":"https://github.com/alexbjorling","followers_url":"https://api.github.com/users/alexbjorling/followers","following_url":"https://api.github.com/users/alexbjorling/following{/other_user}","gists_url":"https://api.github.com/users/alexbjorling/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbjorling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbjorling/subscriptions","organizations_url":"https://api.github.com/users/alexbjorling/orgs","repos_url":"https://api.github.com/users/alexbjorling/repos","events_url":"https://api.github.com/users/alexbjorling/events{/privacy}","received_events_url":"https://api.github.com/users/alexbjorling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-21T12:52:06Z","updated_at":"2016-12-22T17:25:52Z","closed_at":null,"body":"Hi, \r\n\r\nIn a `Plot2D` widget, you can use negative values for `scale` when calling `addImage()`, but then the `MaskToolsWidget` doesn't work (as the following code shows). If `scale` is assumed to be positive, then `addImage()` should raise an error or a warning if otherwise.\r\n\r\n~~~~\r\nimport PyQt4\r\nimport silx.gui.plot\r\nimport numpy as np\r\n\r\napp = PyQt4.QtGui.QApplication([])\r\n\r\nim = np.arange(100).reshape((10, 10))\r\nplot = silx.gui.plot.Plot2D()\r\nplot.addImage(im, scale=(-1, 1))\r\nplot.show()\r\n\r\napp.exec_()\r\n~~~~\r\n\r\nThanks,\r\nAlex"},"comment":{"url":"https://api.github.com/repos/silx-kit/silx/issues/comments/268848215","html_url":"https://github.com/silx-kit/silx/issues/478#issuecomment-268848215","issue_url":"https://api.github.com/repos/silx-kit/silx/issues/478","id":268848215,"user":{"login":"t20100","id":9449698,"avatar_url":"https://avatars.githubusercontent.com/u/9449698?v=3","gravatar_id":"","url":"https://api.github.com/users/t20100","html_url":"https://github.com/t20100","followers_url":"https://api.github.com/users/t20100/followers","following_url":"https://api.github.com/users/t20100/following{/other_user}","gists_url":"https://api.github.com/users/t20100/gists{/gist_id}","starred_url":"https://api.github.com/users/t20100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t20100/subscriptions","organizations_url":"https://api.github.com/users/t20100/orgs","repos_url":"https://api.github.com/users/t20100/repos","events_url":"https://api.github.com/users/t20100/events{/privacy}","received_events_url":"https://api.github.com/users/t20100/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T17:25:52Z","updated_at":"2016-12-22T17:25:52Z","body":"scale can be negative in the Plot, but it was not tested for the mask.\r\nI'll look at it.\r\nIdeally it should be supported, and if the mask do not support it, it should be disabled for such images."}}
{"actor":{"display_login":"t20100"}}