feat(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode (#3664)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
Co-authored-by: Neil <neil.a.macphee@gmail.com>
This commit is contained in:
authored and GitHub committed 2024-04-09 23:57:34 -04:00
1 parent dc0b183dd4
commit d57e8bc157
200 files changed
+9589 -2178

No files matched your search

+130
View File
@@ -0,0 +1,130 @@
const toolGroupIds = {
default: 'dynamic4D-default',
PT: 'dynamic4D-pt',
Fusion: 'dynamic4D-fusion',
CT: 'dynamic4D-ct',
};
function _initToolGroups(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.Probe },
{ toolName: toolNames.EllipticalROI },
{ toolName: toolNames.RectangleROI },
{ toolName: toolNames.RectangleROIThreshold },
{ toolName: toolNames.RectangleScissors },
{ toolName: toolNames.PaintFill },
{ toolName: toolNames.StackScroll },
{ toolName: toolNames.Magnify },
{
toolName: 'CircularBrush',
parentTool: 'Brush',
configuration: {
activeStrategy: 'FILL_INSIDE_CIRCLE',
brushSize: 7,
},
},
{
toolName: 'CircularEraser',
parentTool: 'Brush',
configuration: {
activeStrategy: 'ERASE_INSIDE_CIRCLE',
brushSize: 7,
},
},
{
toolName: 'SphereBrush',
parentTool: 'Brush',
configuration: {
activeStrategy: 'FILL_INSIDE_SPHERE',
brushSize: 7,
},
},
{
toolName: 'SphereEraser',
parentTool: 'Brush',
configuration: {
activeStrategy: 'ERASE_INSIDE_SPHERE',
brushSize: 7,
},
},
{
toolName: 'ThresholdCircularBrush',
parentTool: 'Brush',
configuration: {
activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
brushSize: 7,
},
},
{
toolName: 'ThresholdSphereBrush',
parentTool: 'Brush',
configuration: {
activeStrategy: 'THRESHOLD_INSIDE_SPHERE',
brushSize: 7,
},
},
{ toolName: toolNames.CircleScissors },
{ toolName: toolNames.RectangleScissors },
{ toolName: toolNames.SphereScissors },
{ toolName: toolNames.StackScroll },
{ toolName: toolNames.Magnify },
{ toolName: toolNames.SegmentationDisplay },
],
enabled: [{ toolName: toolNames.SegmentationDisplay }],
disabled: [
{
toolName: toolNames.Crosshairs,
configuration: {
viewportIndicators: false,
disableOnPassive: true,
autoPan: {
enabled: false,
panSize: 10,
},
},
},
],
};
toolGroupService.createToolGroupAndAddTools(toolGroupIds.PT, {
...tools,
passive: [...tools.passive, { toolName: 'RectangleROIStartEndThreshold' }],
});
toolGroupService.createToolGroupAndAddTools(toolGroupIds.CT, {
...tools,
passive: [...tools.passive, { toolName: 'RectangleROIStartEndThreshold' }],
});
toolGroupService.createToolGroupAndAddTools(toolGroupIds.Fusion, {
...tools,
passive: [...tools.passive, { toolName: 'RectangleROIStartEndThreshold' }],
});
toolGroupService.createToolGroupAndAddTools(toolGroupIds.default, tools);
}
function initToolGroups({ toolNames, Enums, toolGroupService, commandsManager }) {
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
}
export { initToolGroups as default, toolGroupIds };