-
Notifications
You must be signed in to change notification settings - Fork 30
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
confine projection #305
confine projection #305
Changes from all commits
0db7e5e
5abeecd
105a242
2c3e68b
205c3ea
0322a13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -517,7 +517,13 @@ export default class DimensionSlider { | |
*/ | ||
getZProjectionDisabled(handle, forwards) { | ||
let dims = this.image_config.image_info.dimensions; | ||
return (handle !== null && forwards || (dims.max_x * dims.max_y) > UNTILED_RETRIEVAL_LIMIT); | ||
let tiled = (dims.max_x * dims.max_y) > UNTILED_RETRIEVAL_LIMIT; | ||
let bytes_per_pixel = Math.ceil(Math.log2(this.image_config.image_info.range[1]) / 8.0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you may want to add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah interesting, so: see if someone set a value explicitly for iviewer, then check the server default, then use a client fallback? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently we don't have the config available from the server. |
||
let size_c = this.image_config.image_info.channels.length; | ||
let stack_size = dims.max_x * dims.max_y * dims.max_z * bytes_per_pixel * size_c; | ||
let proj_limit = this.context.max_projection_bytes; | ||
|
||
return (handle !== null && forwards || tiled || stack_size > proj_limit); | ||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe indicate that this value will be ignored if the limit is greater that the one set server-side.
Server side is work-in-progress but when it is in-place that will be the rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems wrong for the documentation to describe future functionality.
Since I'll need to open a PR to update the functionality, I can change the description at the time to match (depending on what we end up with).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can review the wording later on when we implement the size limit from server
My point is that if people start setting a high limit, this will be ignored later on and will default to the server one. This might come at a surprise for that.