Add level constructor opt for multi-level input #2222

This commit is contained in:
Lovell Fuller
2020-06-06 16:10:56 +01:00
parent 98e0516ac1
commit 7f142bddb3
7 changed files with 65 additions and 29 deletions

View File

@@ -113,6 +113,14 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
throw is.invalidParameterError('page', 'integer between 0 and 100000', inputOptions.page);
}
}
// Multi-level input (OpenSlide)
if (is.defined(inputOptions.level)) {
if (is.integer(inputOptions.level) && is.inRange(inputOptions.level, 0, 256)) {
inputDescriptor.level = inputOptions.level;
} else {
throw is.invalidParameterError('level', 'integer between 0 and 256', inputOptions.level);
}
}
// Create new image
if (is.defined(inputOptions.create)) {
if (