fix(examples): stack and volume segmentation #1684
Merged
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.
fixes #1679
This pull request includes changes to the segmentation examples in the
packages/adapters/examples
directory to enhance the creation and representation of segmentations. The most important changes include the addition of a new function to create segmentation representations, updates to toolbar buttons for segmentation actions, and improvements to the DICOM loading process.Enhancements to segmentation creation and representation:
packages/adapters/examples/segmentationStack/index.ts
: Added thecreateSegmentationRepresentation
function to handle adding labelmap representations to viewports. Updated toolbar buttons to call this new function after segmentation actions. [1] [2] [3]packages/adapters/examples/segmentationVolume/index.ts
: Added thecreateSegmentationRepresentation
function to handle adding labelmap representations to multiple viewports. Updated toolbar buttons to call this new function after segmentation actions. [1] [2] [3]Improvements to DICOM loading process:
packages/adapters/examples/segmentationVolume/utils.ts
: Refactored thereadDicom
andloadSegmentation
functions to integrate the newcreateSegmentation
function, which handles the creation of segmentations from reference images. [1] [2] [3]Minor changes:
utils/ExampleRunner/template-config.js
: Changed thedevtool
configuration fromsource-map
toeval-source-map
for improved build performance during development.