{"action":"created","issue":{"url":"https://api.github.com/repos/InsightSoftwareConsortium/ITK/issues/1365","repository_url":"https://api.github.com/repos/InsightSoftwareConsortium/ITK","labels_url":"https://api.github.com/repos/InsightSoftwareConsortium/ITK/issues/1365/labels{/name}","comments_url":"https://api.github.com/repos/InsightSoftwareConsortium/ITK/issues/1365/comments","events_url":"https://api.github.com/repos/InsightSoftwareConsortium/ITK/issues/1365/events","html_url":"https://github.com/InsightSoftwareConsortium/ITK/pull/1365","id":513445898,"node_id":"MDExOlB1bGxSZXF1ZXN0MzMzMjMyNDc1","number":1365,"title":"WIP: MeanImageFilter much faster, using BufferedImageNeighborhoodPixelAccessPolicy","user":{"login":"N-Dekker","id":27005366,"node_id":"MDQ6VXNlcjI3MDA1MzY2","avatar_url":"https://avatars0.githubusercontent.com/u/27005366?v=4","gravatar_id":"","url":"https://api.github.com/users/N-Dekker","html_url":"https://github.com/N-Dekker","followers_url":"https://api.github.com/users/N-Dekker/followers","following_url":"https://api.github.com/users/N-Dekker/following{/other_user}","gists_url":"https://api.github.com/users/N-Dekker/gists{/gist_id}","starred_url":"https://api.github.com/users/N-Dekker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/N-Dekker/subscriptions","organizations_url":"https://api.github.com/users/N-Dekker/orgs","repos_url":"https://api.github.com/users/N-Dekker/repos","events_url":"https://api.github.com/users/N-Dekker/events{/privacy}","received_events_url":"https://api.github.com/users/N-Dekker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2019-10-28T17:22:18Z","updated_at":"2019-10-30T14:56:38Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/InsightSoftwareConsortium/ITK/pulls/1365","html_url":"https://github.com/InsightSoftwareConsortium/ITK/pull/1365","diff_url":"https://github.com/InsightSoftwareConsortium/ITK/pull/1365.diff","patch_url":"https://github.com/InsightSoftwareConsortium/ITK/pull/1365.patch"},"body":"Improved the performance `MeanImageFilter`, using `ShapedImageNeighborhoodRange` with a newly added pixel access policy, `BufferedImageNeighborhoodPixelAccessPolicy`. Tested performance by:\r\n\r\n    #include <itkMeanImageFilter.h>\r\n    #include <itkImage.h>\r\n    #include <chrono>\r\n    #include <iostream>\r\n\r\n    int main()\r\n    {\r\n      using ImageType = itk::Image<char, 3>;\r\n      const auto image = ImageType::New();\r\n      const auto size = ImageType::SizeType{ 1024, 1024, 16 };\r\n      image->SetRegions(size);\r\n      image->Allocate(true);\r\n\r\n      const auto filter = itk::MeanImageFilter<ImageType, ImageType>::New();\r\n\r\n      for (int i{}; i < 8; ++i)\r\n      {\r\n        filter->SetInput(nullptr);\r\n        filter->SetInput(image);\r\n\r\n        using namespace std::chrono;\r\n        const auto timePointBeforeUpdate = high_resolution_clock::now();\r\n\r\n        filter->Update();\r\n\r\n        const auto timePointAfterUpdate = high_resolution_clock::now();\r\n\r\n        const auto durationSeconds =\r\n          duration_cast<duration<double>>(timePointAfterUpdate - timePointBeforeUpdate);\r\n        std::cout\r\n          << \" Duration: \" << durationSeconds.count() << \" second(s)\"\r\n          << std::endl;\r\n      }\r\n    }\r\n"},"comment":{"url":"https://api.github.com/repos/InsightSoftwareConsortium/ITK/issues/comments/547947411","html_url":"https://github.com/InsightSoftwareConsortium/ITK/pull/1365#issuecomment-547947411","issue_url":"https://api.github.com/repos/InsightSoftwareConsortium/ITK/issues/1365","id":547947411,"node_id":"MDEyOklzc3VlQ29tbWVudDU0Nzk0NzQxMQ==","user":{"login":"dzenanz","id":1792121,"node_id":"MDQ6VXNlcjE3OTIxMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/1792121?v=4","gravatar_id":"","url":"https://api.github.com/users/dzenanz","html_url":"https://github.com/dzenanz","followers_url":"https://api.github.com/users/dzenanz/followers","following_url":"https://api.github.com/users/dzenanz/following{/other_user}","gists_url":"https://api.github.com/users/dzenanz/gists{/gist_id}","starred_url":"https://api.github.com/users/dzenanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzenanz/subscriptions","organizations_url":"https://api.github.com/users/dzenanz/orgs","repos_url":"https://api.github.com/users/dzenanz/repos","events_url":"https://api.github.com/users/dzenanz/events{/privacy}","received_events_url":"https://api.github.com/users/dzenanz/received_events","type":"User","site_admin":false},"created_at":"2019-10-30T14:56:38Z","updated_at":"2019-10-30T14:56:38Z","author_association":"MEMBER","body":"What happens if you use `itkAssertInDebugAndIgnoreInReleaseMacro` instead of `assert`? If that doesn't help, you could apply this trick:\r\nhttps://github.com/InsightSoftwareConsortium/ITK/blob/49671655c88612fabeb5f0784d3f40123100f166/Modules/Core/Common/include/itkImageSource.hxx#L247-L250"}}
{"actor":{"display_login":"dzenanz"}}