Skip to content

Add clarification about the downsampling factor expectation#32

Merged
sbesson merged 1 commit intoglencoesoftware:masterfrom
sbesson:downsampling_docs
Aug 26, 2025
Merged

Add clarification about the downsampling factor expectation#32
sbesson merged 1 commit intoglencoesoftware:masterfrom
sbesson:downsampling_docs

Conversation

@sbesson
Copy link
Copy Markdown
Member

@sbesson sbesson commented Aug 26, 2025

Consistently with the current implementation in

@Override
public List<List<Integer>> getResolutionDescriptions() {
try {
int resolutionLevels = getResolutionLevels();
List<List<Integer>> resolutionDescriptions =
new ArrayList<List<Integer>>();
int sizeX = pixels.getSizeX();
int sizeY = pixels.getSizeY();
for (int i = 0; i < resolutionLevels; i++) {
double scale = Math.pow(2, i);
resolutionDescriptions.add(Arrays.asList(
(int) (sizeX / scale), (int) (sizeY / scale)));
}
return resolutionDescriptions;
} catch (Exception e) {
// FIXME: Throw the right exception
throw new RuntimeException(e);
}
}
, this updates the README to document the current expectation that resolution must be downsampled by a factor 2 alongside X and Y

Note this constraint might be up for discussion especially as recent work in #28 allows to read the scaling factor from the metadata but this would need to be captured and discussed in a dedicated issue.

@sbesson sbesson requested a review from kkoz August 26, 2025 13:57
@sbesson sbesson merged commit d00c68d into glencoesoftware:master Aug 26, 2025
6 checks passed
@sbesson sbesson deleted the downsampling_docs branch August 26, 2025 19:37
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

Successfully merging this pull request may close these issues.

2 participants