-
Notifications
You must be signed in to change notification settings - Fork 334
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
feat(seg): Improve Labelmap Statistics, Interpolation, and Threshold Configuration #1820
Closed
+1,576
−711
Closed
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
bbff42b
refactor(segmentation): Improve strategy configuration and handling f…
sedghi 60b7b68
fix weridness
sedghi 7a0f940
wip
sedghi 9bb438e
Merge branch 'main' of github.com:cornerstonejs/cornerstone3D into fe…
sedghi eed9bb6
feat(segmentation): Add labelmap interpolation utility and related im…
sedghi 6cee10e
wip
sedghi 0fedb92
feat(volume): Add utility for calculating spacing between image IDs
sedghi ffb1a33
feat(cache): Add volume ID generation and image ID lookup utilities
sedghi 3c6494a
refactor(segmentation): Improve segmentation volume retrieval and ID …
sedghi 5a7a45c
fix labelmapstatistics for stack viewport and make it in webworker
sedghi 351ea3e
interpolation with worker
sedghi 1e31f70
publish events
sedghi f02f557
api
sedghi 179dae6
update
sedghi 58c8b84
fix suv peak stuff
sedghi c31c92a
wip
sedghi 247441e
fix
sedghi 2956942
fix
sedghi 7a78c0a
feat: Implement peer import utility for dynamic module loading
sedghi 2e93fb4
update
sedghi f07e2fa
fix: Peer import using split to load wasm
wayfarer3130 5d7e103
Merge branch 'main' of github.com:cornerstonejs/cornerstone3D into fe…
sedghi dfacfd6
Merge branch 'feat/new-seg-stuff' of github.com:cornerstonejs/corners…
sedghi a6da958
fix: Improve volume ID generation and voxel data handling
sedghi 78986a7
fix
sedghi 90d9fce
remove composition
sedghi 4551509
fix dynamic import
sedghi 78e1eb0
fix vite
sedghi ace0183
fix bundler issues
sedghi 289cf2d
Merge branch 'main' of github.com:cornerstonejs/cornerstone3D into fe…
sedghi 20a6d88
silent warning
sedghi 880d3dc
works
sedghi 93342b1
feat: Add configuration support for optional module imports
sedghi aa96ee4
fix
sedghi 2db10c4
fix
sedghi 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## API Report File for "@cornerstonejs/labelmap-interpolation" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
// @public (undocumented) | ||
export function interpolate({ segmentationId, segmentIndex, configuration, }: { | ||
segmentationId: string; | ||
segmentIndex: number; | ||
configuration?: MorphologicalContourInterpolationOptions & { | ||
preview: boolean; | ||
}; | ||
}): Promise<void>; | ||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |
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 |
---|---|---|
|
@@ -20,11 +20,12 @@ | |
"build:esm": "npx lerna run build:esm --stream", | ||
"watch": "npx lerna watch -- lerna run build --scope=$LERNA_PACKAGE_NAME --include-dependents", | ||
"build:update-api:ai": "cd packages/ai && npm run build:update-api", | ||
"build:update-api:labelmap-interpolation": "cd packages/labelmap-interpolation && npm run build:update-api", | ||
"build:update-api:core": "cd packages/core && npm run build:update-api", | ||
"build:update-api:tools": "cd packages/tools && npm run build:update-api", | ||
"build:update-api:nifti": "cd packages/nifti-volume-loader && npm run build:update-api", | ||
"build:update-api:dicomImageLoader": "cd packages/dicomImageLoader && npm run build:update-api", | ||
"build:update-api": "npm run build && npm run build:update-api:ai && npm run build:update-api:core && npm run build:update-api:tools && npm run build:update-api:nifti && npm run build:update-api:dicomImageLoader", | ||
"build:update-api": "npm run build && npm run build:update-api:ai && npm run build:update-api:core && npm run build:update-api:tools && npm run build:update-api:nifti && npm run build:update-api:dicomImageLoader && npm run build:update-api:labelmap-interpolation", | ||
"clean": "npx lerna run clean --stream", | ||
"clean:deep": "npx lerna run clean:deep --stream", | ||
"example": "node ./utils/ExampleRunner/example-runner-cli.js", | ||
|
@@ -184,5 +185,6 @@ | |
"not ie < 11", | ||
"not op_mini all" | ||
], | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", | ||
"dependencies": {} | ||
} |
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.
I love the idea, however I wonder if the hash length is sufficiently unique that we won't ever generate two hashes containing the same hash code? Would sha1 to 8 digits be better? That is natively encoded and is reasonably fast.
async function sha1(str) {
const enc = new TextEncoder();
const hash = await crypto.subtle.digest('SHA-1', enc.encode(str));
return Array.from(new Uint8Array(hash))
.map(v => v.toString(16).padStart(2, '0'))
.join('');
}
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.
Also, does it need to be order invariant? Should the entries be sorted first?
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 like crypto apis rely on secure context, so i guess we can't