{"action":"created","issue":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/228","labels_url":"https://api.github.com/repos/Slicer/Slicer/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/Slicer/Slicer/issues/228/comments","events_url":"https://api.github.com/repos/Slicer/Slicer/issues/228/events","html_url":"https://github.com/Slicer/Slicer/pull/228","id":54400759,"number":228,"title":"ENH: Use the latest vtkImageReslice filter instead of vtkImageResliceMask","user":{"login":"lassoan","id":307929,"avatar_url":"https://avatars.githubusercontent.com/u/307929?v=3","gravatar_id":"","url":"https://api.github.com/users/lassoan","html_url":"https://github.com/lassoan","followers_url":"https://api.github.com/users/lassoan/followers","following_url":"https://api.github.com/users/lassoan/following{/other_user}","gists_url":"https://api.github.com/users/lassoan/gists{/gist_id}","starred_url":"https://api.github.com/users/lassoan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lassoan/subscriptions","organizations_url":"https://api.github.com/users/lassoan/orgs","repos_url":"https://api.github.com/users/lassoan/repos","events_url":"https://api.github.com/users/lassoan/events{/privacy}","received_events_url":"https://api.github.com/users/lassoan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-01-15T01:18:30Z","updated_at":"2015-02-05T15:48:18Z","closed_at":"2015-02-03T04:25:44Z","pull_request":{"url":"https://api.github.com/repos/Slicer/Slicer/pulls/228","html_url":"https://github.com/Slicer/Slicer/pull/228","diff_url":"https://github.com/Slicer/Slicer/pull/228.diff","patch_url":"https://github.com/Slicer/Slicer/pull/228.patch"},"body":"\r\nFeatures:\r\n* Performance optimization: about 2x speed increase in slice rendering speed when the volume is linearly transformed (e.g., transformed MRHead refresh rate 25fps -> 50fps)\r\n* Thick slices, MIP, DRR, etc. display modes are available (no GUI yet, but already can be enabled using Python), see the code samples below\r\n\r\nImplementation:\r\n* Convert composite transform to simple linear filter before setting it in the reslice filter (because vtkImageResliceMask can do some additional optimizations if it gets a simple linear transform)\r\n* Use the latest vtkImageReslice filter instead of vtkImageResliceMask:\r\n** mask output of vtkImageReslice is a stencil, therefore slice processing pipeline is simplified: vtkImageCast filter is not needed anymore and the more efficient vtkImageStencil is used instead of vtkImageMathematics\r\n** custom vtkImageResliceMask class is removed: no need to maintain it any longer, etc.\r\n\r\nThick slice:\r\n\r\nsliceNode = slicer.mrmlScene.GetNodeByID('vtkMRMLSliceNodeRed')\r\nappLogic = slicer.app.applicationLogic()\r\nsliceLogic = appLogic.GetSliceLogic(sliceNode)\r\nsliceLayerLogic = sliceLogic.GetBackgroundLayer()\r\nreslice = sliceLayerLogic.GetReslice()\r\nreslice.SetSlabModeToMean()\r\nreslice.SetSlabNumberOfSlices(10)\r\nreslice.SetSlabSliceSpacingFraction(0.3)\r\nsliceNode.Modified()\r\n\r\nMaximum intensity projection (MIP):\r\n\r\nsliceNode = slicer.mrmlScene.GetNodeByID('vtkMRMLSliceNodeRed')\r\nappLogic = slicer.app.applicationLogic()\r\nsliceLogic = appLogic.GetSliceLogic(sliceNode)\r\nsliceLayerLogic = sliceLogic.GetBackgroundLayer()\r\nreslice = sliceLayerLogic.GetReslice()\r\nreslice.SetSlabModeToMax()\r\nreslice.SetSlabNumberOfSlices(600)\r\nreslice.SetSlabSliceSpacingFraction(0.5)\r\nsliceNode.Modified()"},"comment":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/comments/73068520","html_url":"https://github.com/Slicer/Slicer/pull/228#issuecomment-73068520","issue_url":"https://api.github.com/repos/Slicer/Slicer/issues/228","id":73068520,"user":{"login":"jcfr","id":219043,"avatar_url":"https://avatars.githubusercontent.com/u/219043?v=3","gravatar_id":"","url":"https://api.github.com/users/jcfr","html_url":"https://github.com/jcfr","followers_url":"https://api.github.com/users/jcfr/followers","following_url":"https://api.github.com/users/jcfr/following{/other_user}","gists_url":"https://api.github.com/users/jcfr/gists{/gist_id}","starred_url":"https://api.github.com/users/jcfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcfr/subscriptions","organizations_url":"https://api.github.com/users/jcfr/orgs","repos_url":"https://api.github.com/users/jcfr/repos","events_url":"https://api.github.com/users/jcfr/events{/privacy}","received_events_url":"https://api.github.com/users/jcfr/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T15:48:18Z","updated_at":"2015-02-05T15:48:18Z","body":"Thanks\n\nOn Thu, Feb 5, 2015 at 10:41 AM, Andras Lasso <notifications@github.com>\nwrote:\n\n> OK. I'll commit a patch soon.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/Slicer/Slicer/pull/228#issuecomment-73067181>.\n>\n\n\n\n-- \n+1 919 869 8849\n"}}