feat: improve segment label (#5217)
Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
This commit is contained in:
1 parent
dd896fea25
commit
271b84f78f
22 files changed
+163
-44
No files matched your search
@@ -1,7 +1,14 @@
|
||||
function createSEGToolGroupAndAddTools(ToolGroupService, customizationService, toolGroupId) {
|
||||
function createSEGToolGroupAndAddTools({
|
||||
commandsManager,
|
||||
toolGroupService,
|
||||
customizationService,
|
||||
toolGroupId,
|
||||
}) {
|
||||
const tools = customizationService.getCustomization('cornerstone.overlayViewportTools');
|
||||
|
||||
return ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
|
||||
const updatedTools = commandsManager.run('initializeSegmentLabelTool', { tools });
|
||||
|
||||
return toolGroupService.createToolGroupAndAddTools(toolGroupId, updatedTools);
|
||||
}
|
||||
|
||||
export default createSEGToolGroupAndAddTools;
|
||||
@@ -214,7 +214,12 @@ function OHIFCornerstoneSEGViewport(props: withAppTypes) {
|
||||
|
||||
// This creates a custom tool group which has the lifetime of this view
|
||||
// only, and does NOT interfere with currently displayed segmentations.
|
||||
toolGroup = createSEGToolGroupAndAddTools(toolGroupService, customizationService, toolGroupId);
|
||||
toolGroup = createSEGToolGroupAndAddTools({
|
||||
commandsManager,
|
||||
toolGroupService,
|
||||
customizationService,
|
||||
toolGroupId,
|
||||
});
|
||||
|
||||
return () => {
|
||||
// remove the segmentation representations if seg displayset changed
|
||||
|
||||
Reference in new issue
Block a user