{"action":"created","issue":{"url":"https://api.github.com/repos/stnava/ANTsR/issues/42","labels_url":"https://api.github.com/repos/stnava/ANTsR/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/stnava/ANTsR/issues/42/comments","events_url":"https://api.github.com/repos/stnava/ANTsR/issues/42/events","html_url":"https://github.com/stnava/ANTsR/issues/42","id":65477055,"number":42,"title":"cropImage - wrong number of slices","user":{"login":"dorianps","id":9083517,"avatar_url":"https://avatars.githubusercontent.com/u/9083517?v=3","gravatar_id":"","url":"https://api.github.com/users/dorianps","html_url":"https://github.com/dorianps","followers_url":"https://api.github.com/users/dorianps/followers","following_url":"https://api.github.com/users/dorianps/following{/other_user}","gists_url":"https://api.github.com/users/dorianps/gists{/gist_id}","starred_url":"https://api.github.com/users/dorianps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dorianps/subscriptions","organizations_url":"https://api.github.com/users/dorianps/orgs","repos_url":"https://api.github.com/users/dorianps/repos","events_url":"https://api.github.com/users/dorianps/events{/privacy}","received_events_url":"https://api.github.com/users/dorianps/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-31T15:22:58Z","updated_at":"2015-03-31T15:39:59Z","closed_at":"2015-03-31T15:39:59Z","body":"@bkandel thought this is bug.\r\n\r\nI have a crop mask with 7 slices (83:89), but crop is producing an image with 8 slices.\r\n\r\nGet file here:\r\nhttps://www.dropbox.com/s/ot4ponqk7j221n6/templateBrainMask.nii.gz?dl=0\r\n\r\nRun:\r\nbrainmask=antsImageRead('templateBrainMask.nii.gz',3)\r\ncropmask=brainmask*0\r\ncropmask[1:192,1:256, 83:89] = 1\r\ncropImage(brainmask,cropmask)\r\nantsImage\r\n  Pixel Type   : float \r\n  Pixel Size   :  \r\n  Dimensions   : 192x256x8 \r\n  Voxel Spacing: 0.9765625x0.9765625x1 \r\n  Origin       : -93 138.1172 1 \r\n  Direction    : 1 0 0 0 -1 0 0 0 1 "},"comment":{"url":"https://api.github.com/repos/stnava/ANTsR/issues/comments/88137319","html_url":"https://github.com/stnava/ANTsR/issues/42#issuecomment-88137319","issue_url":"https://api.github.com/repos/stnava/ANTsR/issues/42","id":88137319,"user":{"login":"stnava","id":324222,"avatar_url":"https://avatars.githubusercontent.com/u/324222?v=3","gravatar_id":"","url":"https://api.github.com/users/stnava","html_url":"https://github.com/stnava","followers_url":"https://api.github.com/users/stnava/followers","following_url":"https://api.github.com/users/stnava/following{/other_user}","gists_url":"https://api.github.com/users/stnava/gists{/gist_id}","starred_url":"https://api.github.com/users/stnava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stnava/subscriptions","organizations_url":"https://api.github.com/users/stnava/orgs","repos_url":"https://api.github.com/users/stnava/repos","events_url":"https://api.github.com/users/stnava/events{/privacy}","received_events_url":"https://api.github.com/users/stnava/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T15:39:59Z","updated_at":"2015-03-31T15:39:59Z","body":"again - this is the location of the issue\r\n\r\n```\r\ncropmask[1:192,1:256, 83:89] = 1\r\n````\r\n\r\nwhich , if you look at the resulting image, is not what you expect.  has nothing to do with cropImage.\r\n\r\nif someone wants to resolve this, then recommend opening another issue that has to do with indexing.\r\n\r\nunfortunately, i wont have time to look at this ... possibly until august."}}