Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SplitFunctions to split domains in hypercubes #1521

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

phcerdan
Copy link
Member

@phcerdan phcerdan commented Oct 7, 2020

Given a domain defined by lower and upper bound points and
requested_number_of_splits implements two functions:

  • computeSplits returns the number of splits that the
    region can hold (lesser or equal than the requested)
  • getSplit returns the ith split and the outputLowerBound and
    outputUpperBound of the split region.

Implementation acquired from ITK: itkImageRegionSplitterMultidimensional.cxx
https://github.com/InsightSoftwareConsortium/ITK/blob/f971477cdacff22a861dfcbaccd89c0cf2755af7/Modules/Core/Common/src/itkImageRegionSplitterMultidimensional.cxx

  • Add splitComplex to SplitFunctions
  • Add test and change testSplitFunctions to use Catch

Checklist

  • Unit-test of your feature with Catch.
  • Doxygen documentation of the code completed (classes, methods, types, members...)
  • [NA] Documentation module page added or updated.
  • New entry in the ChangeLog.md added.
  • No warning raised in Debug cmake mode (otherwise, Travis C.I. will fail).
  • All continuous integration tests pass (Travis & appveyor)

@phcerdan phcerdan force-pushed the split_functions0 branch 2 times, most recently from 68c948a to 2b397e4 Compare October 7, 2020 14:16
@phcerdan
Copy link
Member Author

phcerdan commented Oct 7, 2020

This is a rebase from #1448. The thinning algorithm with splits was discarded.

Given a domain defined by lower and upper bound points and
requested_number_of_splits implements two functions:
- computeSplits returns the number of splits that the
region can hold (lesser or equal than the requested)
- getSplit returns the ith split and the outputLowerBound and
outputUpperBound of the split region.

Implementation acquired from ITK: itkImageRegionSplitterMultidimensional.cxx
https://github.com/InsightSoftwareConsortium/ITK/blob/f971477cdacff22a861dfcbaccd89c0cf2755af7/Modules/Core/Common/src/itkImageRegionSplitterMultidimensional.cxx

- Add splitComplex to SplitFunctions
- Add test and change testSplitFunctions to use Catch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants