{"action":"created","issue":{"url":"https://api.github.com/repos/chafey/cornerstone/issues/31","labels_url":"https://api.github.com/repos/chafey/cornerstone/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/chafey/cornerstone/issues/31/comments","events_url":"https://api.github.com/repos/chafey/cornerstone/issues/31/events","html_url":"https://github.com/chafey/cornerstone/issues/31","id":107201411,"number":31,"title":"Non-square images are broken (shearing problem)","user":{"login":"dblezek","id":76340,"avatar_url":"https://avatars.githubusercontent.com/u/76340?v=3","gravatar_id":"","url":"https://api.github.com/users/dblezek","html_url":"https://github.com/dblezek","followers_url":"https://api.github.com/users/dblezek/followers","following_url":"https://api.github.com/users/dblezek/following{/other_user}","gists_url":"https://api.github.com/users/dblezek/gists{/gist_id}","starred_url":"https://api.github.com/users/dblezek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblezek/subscriptions","organizations_url":"https://api.github.com/users/dblezek/orgs","repos_url":"https://api.github.com/users/dblezek/repos","events_url":"https://api.github.com/users/dblezek/events{/privacy}","received_events_url":"https://api.github.com/users/dblezek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-18T13:19:58Z","updated_at":"2015-09-18T13:23:35Z","closed_at":null,"body":"Modified the [custom image loader](https://rawgit.com/chafey/cornerstone/master/example/imageloader/index.html) example to create a non-square image (256x200).  Got a broken rendering:\r\n\r\n![broken image rendering](https://cloud.githubusercontent.com/assets/76340/9960028/b5dff566-5ddd-11e5-8963-df56dfeaf79f.png)\r\n\r\nGot a bit lost in the source code, or would have submitted a pull request.  Any pointers helpful!\r\n\r\nBroken code fragment (modified from the example, but intended to display NIfTI images):\r\n\r\n```\r\n        rows = 256;\r\n        columns = 200;\r\n        var width = rows;\r\n        var height = columns;\r\n\r\n        var numPixels = width * height;\r\n        var pixelData = new Uint16Array(numPixels);\r\n        var index = 0;\r\n        var rnd = Math.round(Math.random() * 255);\r\n        for (var y = 0; y < height; y++) {\r\n          for (var x = 0; x < width; x++) {\r\n            pixelData[index] = (x + rnd) % 256;\r\n            index++;\r\n          }\r\n        }\r\n```"},"comment":{"url":"https://api.github.com/repos/chafey/cornerstone/issues/comments/141450624","html_url":"https://github.com/chafey/cornerstone/issues/31#issuecomment-141450624","issue_url":"https://api.github.com/repos/chafey/cornerstone/issues/31","id":141450624,"user":{"login":"chafey","id":1268698,"avatar_url":"https://avatars.githubusercontent.com/u/1268698?v=3","gravatar_id":"","url":"https://api.github.com/users/chafey","html_url":"https://github.com/chafey","followers_url":"https://api.github.com/users/chafey/followers","following_url":"https://api.github.com/users/chafey/following{/other_user}","gists_url":"https://api.github.com/users/chafey/gists{/gist_id}","starred_url":"https://api.github.com/users/chafey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chafey/subscriptions","organizations_url":"https://api.github.com/users/chafey/orgs","repos_url":"https://api.github.com/users/chafey/repos","events_url":"https://api.github.com/users/chafey/events{/privacy}","received_events_url":"https://api.github.com/users/chafey/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T13:23:35Z","updated_at":"2015-09-18T13:23:35Z","body":"Looks like you have rows and columns swapped"}}