-
Notifications
You must be signed in to change notification settings - Fork 26
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
Use mag in data requests, no more zoomStep/exponent #6159
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
fda1a47
[WIP] use mag in data requests, no more zoomStep/exponent
fm3 ad8d043
unify mag parsing
fm3 6936522
some renaming from resolution to mag
fm3 6792f02
some backwards compatibility
fm3 9a76756
Merge branch 'master' into data-request-mag
fm3 f22d3b8
Fix types, remove dead code, clean up thumbnail creation
fm3 e58fa06
use 3-component mag instead of zoomstep when requesting buckets, isos…
daniel-wer 07bd5e7
fix frontend tests
daniel-wer 91e138a
move test snapshots to new test directory, which was missed in https:…
daniel-wer a82b6a1
let tests fail in CI if a snapshot doesn't exist
daniel-wer 1763f4f
test whether tests actually fail in CI if a snapshot is missing
daniel-wer 9c11719
pass through CI env variable to docker
daniel-wer 96c73a0
Revert "test whether tests actually fail in CI if a snapshot is missing"
daniel-wer bfe57bf
update e2e snapshots
daniel-wer 8d96065
bump datastore api version
fm3 b191a98
Merge branch 'data-request-mag' of github.com:scalableminds/webknosso…
fm3 84a94a9
changelog + migration guide
fm3 d2d747e
Merge branch 'master' into data-request-mag
fm3 5776c71
drop swagger annotation
fm3 e9ce879
merge master, unify mag parsing
fm3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,20 @@ export class ResolutionInfo { | |
return resolution; | ||
} | ||
|
||
getIndexByResolution(resolution: Vector3): number { | ||
const index = Math.log2(Math.max(...resolution)); | ||
|
||
// Assert that the index exists and that the resolution at that index | ||
// equals the resolution argument | ||
const resolutionMaybe = this.getResolutionByIndex(index); | ||
if (!_.isEqual(resolution, resolutionMaybe)) { | ||
throw new Error( | ||
`Resolution ${resolution} with index ${index} is not equal to existing resolution at that index: ${resolutionMaybe}.`, | ||
); | ||
} | ||
return index; | ||
} | ||
|
||
getResolutionByIndexWithFallback( | ||
index: number, | ||
fallbackResolutionInfo: ResolutionInfo | null | undefined, | ||
|
@@ -167,6 +181,16 @@ export class ResolutionInfo { | |
return Math.log2(this.getLowestResolutionPowerOf2()); | ||
} | ||
|
||
getHighestResolution(): Vector3 { | ||
// @ts-ignore | ||
return this.getResolutionByPowerOf2(this.getHighestResolutionPowerOf2()); | ||
} | ||
Comment on lines
+184
to
+187
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. I just noticed that this method isn't used anywhere. Only But I think it is fine to keep this method in case someone wants the highest resolution in the future. |
||
|
||
getLowestResolution(): Vector3 { | ||
// @ts-ignore | ||
return this.getResolutionByPowerOf2(this.getLowestResolutionPowerOf2()); | ||
} | ||
|
||
getAllIndices(): Array<number> { | ||
return this.getResolutionsWithIndices().map((entry) => entry[0]); | ||
} | ||
|
1 change: 0 additions & 1 deletion
1
frontend/javascripts/oxalis/model/bucket_data_handling/prefetch_strategy_plane.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nice refactoring 👍