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

Stop Generating New Scale Levels Earlier #34

Open
cmhulbert opened this issue Jan 30, 2024 · 0 comments
Open

Stop Generating New Scale Levels Earlier #34

cmhulbert opened this issue Jan 30, 2024 · 0 comments

Comments

@cmhulbert
Copy link
Contributor

cmhulbert commented Jan 30, 2024

The current implementation of N5ScalePyramidSpark#downsampleScalePyramid will generate scale levels that are extremely small such that that smallest scale levels potentially have only a single value along one or more dimensions.

Some ongoing conversations agreed that it was reasonable to stop sooner ( as a rule of thumb, not a hard rule), so as not to generate unnecessary scale levels. A suggestion to only downsampling until the dimensions at the highest scale level are less than 64 in all dimensions seemed reasonable.

I'd propose replacing the lines linked about with something along the lines of:

if ( Arrays.stream( downsampledDimensions ).max().getAsLong() < 64  || Arrays.stream( downsampledDimensions ).min().getAsLong() < 1 )
    break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant