export const toolGroupIds = {
CT: 'ctToolGroup',
PT: 'ptToolGroup',
Fusion: 'fusionToolGroup',
MIP: 'mipToolGroup',
default: 'default',
// MPR: 'mpr',
};
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
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,
configuration: {
getTextCallback: (callback, eventDetails) => {
if (modeLabelConfig) {
callback(' ');
} else {
commandsManager.runCommand('arrowTextCallback', {
callback,
eventDetails,
});
}
changeTextCallback: (data, eventDetails, callback) => {
if (modeLabelConfig === undefined) {
data,
{ toolName: toolNames.Bidirectional },
{ toolName: toolNames.DragProbe },
{ toolName: toolNames.Probe },
{ toolName: toolNames.EllipticalROI },
{ toolName: toolNames.RectangleROI },
{ toolName: toolNames.StackScroll },
{ toolName: toolNames.Angle },
{ toolName: toolNames.CobbAngle },
{ toolName: toolNames.Magnify },
enabled: [{ toolName: toolNames.SegmentationDisplay }],
disabled: [
toolName: toolNames.Crosshairs,
viewportIndicators: false,
disableOnPassive: true,
autoPan: {
enabled: false,
panSize: 10,
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 = {
toolName: toolNames.VolumeRotateMouseWheel,
rotateIncrementDegrees: 5,
toolName: toolNames.MipJumpToClick,
toolGroupId: toolGroupIds.PT,
enabled: [
{ toolName: toolNames.SegmentationDisplay },
toolName: toolNames.OrientationMarker,
orientationWidget: {
viewportCorner: 'BOTTOM_LEFT',
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig) {
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager, modeLabelConfig);
export default initToolGroups;