feat(segmentation mode): Add create, and export SEG with Brushes (#3632)
This commit is contained in:
1 parent
896866e9d0
commit
48bbd6281a
186 files changed
+6801
-2883
No files matched your search
@@ -81,7 +81,6 @@ function modeFactory() {
|
||||
const activateTool = () => {
|
||||
toolbarService.recordInteraction({
|
||||
groupId: 'WindowLevel',
|
||||
itemId: 'WindowLevel',
|
||||
interactionType: 'tool',
|
||||
commands: [
|
||||
{
|
||||
|
||||
@@ -23,7 +23,23 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
{ toolName: toolNames.ArrowAnnotate },
|
||||
{
|
||||
toolName: toolNames.ArrowAnnotate,
|
||||
configuration: {
|
||||
getTextCallback: (callback, eventDetails) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
eventDetails,
|
||||
}),
|
||||
|
||||
changeTextCallback: (data, eventDetails, callback) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
data,
|
||||
eventDetails,
|
||||
}),
|
||||
},
|
||||
},
|
||||
{ toolName: toolNames.Bidirectional },
|
||||
{ toolName: toolNames.DragProbe },
|
||||
{ toolName: toolNames.EllipticalROI },
|
||||
@@ -39,24 +55,7 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
|
||||
disabled: [{ toolName: toolNames.ReferenceLines }],
|
||||
};
|
||||
|
||||
const toolsConfig = {
|
||||
[toolNames.ArrowAnnotate]: {
|
||||
getTextCallback: (callback, eventDetails) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
eventDetails,
|
||||
}),
|
||||
|
||||
changeTextCallback: (data, eventDetails, callback) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
data,
|
||||
eventDetails,
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupId, tools, toolsConfig);
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
|
||||
}
|
||||
|
||||
function initSRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
||||
@@ -117,25 +116,8 @@ function initSRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
||||
// disabled
|
||||
};
|
||||
|
||||
const toolsConfig = {
|
||||
[toolNames.ArrowAnnotate]: {
|
||||
getTextCallback: (callback, eventDetails) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
eventDetails,
|
||||
}),
|
||||
|
||||
changeTextCallback: (data, eventDetails, callback) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
data,
|
||||
eventDetails,
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
const toolGroupId = 'SRToolGroup';
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupId, tools, toolsConfig);
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
|
||||
}
|
||||
|
||||
function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
||||
@@ -163,7 +145,23 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
{ toolName: toolNames.ArrowAnnotate },
|
||||
{
|
||||
toolName: toolNames.ArrowAnnotate,
|
||||
configuration: {
|
||||
getTextCallback: (callback, eventDetails) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
eventDetails,
|
||||
}),
|
||||
|
||||
changeTextCallback: (data, eventDetails, callback) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
data,
|
||||
eventDetails,
|
||||
}),
|
||||
},
|
||||
},
|
||||
{ toolName: toolNames.Bidirectional },
|
||||
{ toolName: toolNames.DragProbe },
|
||||
{ toolName: toolNames.EllipticalROI },
|
||||
@@ -173,37 +171,25 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
|
||||
{ toolName: toolNames.Angle },
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
],
|
||||
disabled: [{ toolName: toolNames.Crosshairs }, { toolName: toolNames.ReferenceLines }],
|
||||
disabled: [
|
||||
{
|
||||
toolName: toolNames.Crosshairs,
|
||||
configuration: {
|
||||
viewportIndicators: false,
|
||||
autoPan: {
|
||||
enabled: false,
|
||||
panSize: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
{ toolName: toolNames.ReferenceLines },
|
||||
],
|
||||
|
||||
// enabled
|
||||
// disabled
|
||||
};
|
||||
|
||||
const toolsConfig = {
|
||||
[toolNames.Crosshairs]: {
|
||||
viewportIndicators: false,
|
||||
autoPan: {
|
||||
enabled: false,
|
||||
panSize: 10,
|
||||
},
|
||||
},
|
||||
[toolNames.ArrowAnnotate]: {
|
||||
getTextCallback: (callback, eventDetails) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
eventDetails,
|
||||
}),
|
||||
|
||||
changeTextCallback: (data, eventDetails, callback) =>
|
||||
commandsManager.runCommand('arrowTextCallback', {
|
||||
callback,
|
||||
data,
|
||||
eventDetails,
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
toolGroupService.createToolGroupAndAddTools('mpr', tools, toolsConfig);
|
||||
toolGroupService.createToolGroupAndAddTools('mpr', tools);
|
||||
}
|
||||
|
||||
function initToolGroups(extensionManager, toolGroupService, commandsManager) {
|
||||
|
||||
Reference in new issue
Block a user