How To Switch ToolGroup for a tool ( VolumeRotateMouseWheel) that only works in mipToolGroup

Can I use VolumeRotateMouseWheel without using mipToolGroup?

I’m configuring layouts with the new Layout select and I added VolumeRotateMouseWheel in my mode:

 active: [
      {
        toolName: toolNames.VolumeRotateMouseWheel,
        configuration: {
          rotateIncrementDegrees: 5,
        },
      },
...
]

toolGroupService.createToolGroupAndAddTools('segmentationToolGroup', tools);

To use with my hanging protocol for a 3D view of CT/NM/SEG:

export const only3D = {
  id: 'only3D',
  locked: true,
  name: '3D only',
  icon: 'layout-advanced-3d-only',
  isPreset: true,
  imageLoadStrategy,
  toolGroupId: 'segmentationToolGroup',
  displaySetSelectors,
  stages: [
    {
      id: 'only3DStage',
      name: 'only3D',
      viewportStructure: {
        layoutType: 'grid',
        properties: {
          rows: 1,
          columns: 1,
        },
      },
      viewports: [
        {
          viewportOptions: {
            viewportId: 'mipSagittal',
            viewportType: 'volume',
            orientation: 'coronal',
           toolGroupId: 'segmentationToolGroup',
    //Why do I have to use this? ---> toolGroupId: 'mipToolGroup',
            syncGroups: [
          
            ],
          },
          displaySets: [
            {
              options: {
                blendMode: 'MIP',
                slabThickness: 'fullVolume',
              },
              id: 'mipDisplaySet',
            },
            ...displaySets,
          ],
        },
      ],
    },
  ],
};

But I can’t get the view to rotate. I have to use the mipToolGroup then I can rotate the viewport BUT all my tools and volume settings are in segmentationToolGroup so I can’t use mipToolGroup.

How can I configure VolumeRotateMouseWheel (without mipToolGroup) and use my segmentationToolGroup instead?

I figured it out for anyone who needs to run a function (For my task it was switch toolGroupId):

Add a section to your hanging protocol:

callbacks: {
    onProtocolEnter: [
      {
        commandName: 'someFunctionThatNeedsTheToolGroupID',
        commandOptions: {  toolGroupId: 'bToolGroup' },
        context: 'DICOM',
      },
    ],
    onProtocolExit: [
      {
        commandName: 'someFunctionThatNeedsTheToolGroupID',
        commandOptions: {  toolGroupId: 'aToolGroup' },
        context: 'DICOM',
      },
    ],
  },

More info here: