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
@@ -58,7 +58,6 @@ function modeFactory({ modeConfiguration }) {
|
||||
const setWindowLevelActive = () => {
|
||||
toolbarService.recordInteraction({
|
||||
groupId: 'WindowLevel',
|
||||
itemId: 'WindowLevel',
|
||||
interactionType: 'tool',
|
||||
commands: [
|
||||
{
|
||||
|
||||
@@ -26,7 +26,24 @@ function _initToolGroups(toolNames, Enums, 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.Probe },
|
||||
@@ -38,138 +55,54 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
|
||||
{ toolName: toolNames.Magnify },
|
||||
],
|
||||
enabled: [{ toolName: toolNames.SegmentationDisplay }],
|
||||
disabled: [{ toolName: toolNames.Crosshairs }],
|
||||
disabled: [
|
||||
{
|
||||
toolName: toolNames.Crosshairs,
|
||||
configuration: {
|
||||
viewportIndicators: false,
|
||||
autoPan: {
|
||||
enabled: false,
|
||||
panSize: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
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(toolGroupIds.CT, tools, toolsConfig);
|
||||
toolGroupService.createToolGroupAndAddTools(
|
||||
toolGroupIds.PT,
|
||||
{
|
||||
active: tools.active,
|
||||
passive: [...tools.passive, { toolName: 'RectangleROIStartEndThreshold' }],
|
||||
enabled: tools.enabled,
|
||||
disabled: tools.disabled,
|
||||
},
|
||||
toolsConfig
|
||||
);
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.Fusion, tools, toolsConfig);
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.default, tools, toolsConfig);
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.CT, tools);
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.PT, {
|
||||
active: tools.active,
|
||||
passive: [...tools.passive, { toolName: 'RectangleROIStartEndThreshold' }],
|
||||
enabled: tools.enabled,
|
||||
disabled: tools.disabled,
|
||||
});
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.Fusion, tools);
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.default, tools);
|
||||
|
||||
const mipTools = {
|
||||
active: [
|
||||
{
|
||||
toolName: toolNames.VolumeRotateMouseWheel,
|
||||
configuration: {
|
||||
rotateIncrementDegrees: 0.1,
|
||||
},
|
||||
},
|
||||
{
|
||||
toolName: toolNames.MipJumpToClick,
|
||||
configuration: {
|
||||
toolGroupId: toolGroupIds.PT,
|
||||
},
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Primary }],
|
||||
},
|
||||
],
|
||||
enabled: [{ toolName: toolNames.SegmentationDisplay }],
|
||||
};
|
||||
|
||||
const mipToolsConfig = {
|
||||
[toolNames.VolumeRotateMouseWheel]: {
|
||||
rotateIncrementDegrees: 0.1,
|
||||
},
|
||||
[toolNames.MipJumpToClick]: {
|
||||
toolGroupId: toolGroupIds.PT,
|
||||
},
|
||||
};
|
||||
|
||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools, mipToolsConfig);
|
||||
}
|
||||
|
||||
function initMPRToolGroup(toolNames, Enums, toolGroupService, commandsManager) {
|
||||
const tools = {
|
||||
active: [
|
||||
{
|
||||
toolName: toolNames.WindowLevel,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Primary }],
|
||||
},
|
||||
{
|
||||
toolName: toolNames.Pan,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Auxiliary }],
|
||||
},
|
||||
{
|
||||
toolName: toolNames.Zoom,
|
||||
bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
|
||||
},
|
||||
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
|
||||
],
|
||||
passive: [
|
||||
{ toolName: toolNames.Length },
|
||||
{ toolName: toolNames.ArrowAnnotate },
|
||||
{ toolName: toolNames.Bidirectional },
|
||||
{ toolName: toolNames.DragProbe },
|
||||
{ toolName: toolNames.EllipticalROI },
|
||||
{ toolName: toolNames.RectangleROI },
|
||||
{ toolName: toolNames.StackScroll },
|
||||
{ toolName: toolNames.Angle },
|
||||
{ toolName: toolNames.CobbAngle },
|
||||
{ toolName: toolNames.SegmentationDisplay },
|
||||
],
|
||||
disabled: [{ toolName: toolNames.Crosshairs }],
|
||||
|
||||
// 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(toolGroupIds.MIP, mipTools);
|
||||
}
|
||||
|
||||
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
|
||||
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
|
||||
// initMPRToolGroup(toolNames, Enums, toolGroupService, commandsManager);
|
||||
}
|
||||
|
||||
export default initToolGroups;
|
||||
Reference in new issue
Block a user