fix(typescript): rename services to fix typescript (#3165)

* fix: Rename services to lower camel case, hp, measure

* fix: Rename DisplaySetService instances to displaySetService

* fix: Rename CornerstoneViewportService to lower camel case

* fix: Added lower case segmentationService rename

* rename other services (#3166)

* rename uiDialogService

* rename toolGroupService

* rename uiNotificationService

* rename viewportGridService

* rename syncGroupService

* rename CornerstoneCacheService

* Fix a syntax error in hotkeys

* Fix a couple of rename issues that were missed

---------

Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
Bill WallaceandAlireza authored and GitHub committed 2023-02-10 16:46:09 -05:00
1 parent a97fb2fc9a
commit 8af0362d12
97 files changed
+934 -908

No files matched your search

+19 -19
View File
@@ -43,9 +43,9 @@ function modeFactory({ modeConfiguration }) {
onModeEnter: ({ servicesManager, extensionManager, commandsManager }) => {
const {
toolbarService,
ToolGroupService,
HangingProtocolService,
DisplaySetService,
toolGroupService,
hangingProtocolService,
displaySetService,
} = servicesManager.services;
const utilityModule = extensionManager.getModuleEntry(
@@ -55,7 +55,7 @@ function modeFactory({ modeConfiguration }) {
const { toolNames, Enums } = utilityModule.exports;
// Init Default and SR ToolGroups
initToolGroups(toolNames, Enums, ToolGroupService, commandsManager);
initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
const setWindowLevelActive = () => {
toolbarService.recordInteraction({
@@ -91,28 +91,28 @@ function modeFactory({ modeConfiguration }) {
});
};
const { unsubscribe } = ToolGroupService.subscribe(
ToolGroupService.EVENTS.VIEWPORT_ADDED,
const { unsubscribe } = toolGroupService.subscribe(
toolGroupService.EVENTS.VIEWPORT_ADDED,
() => {
// For fusion toolGroup we need to add the volumeIds for the crosshairs
// since in the fusion viewport we don't want both PT and CT to render MIP
// when slabThickness is modified
const {
displaySetMatchDetails,
} = HangingProtocolService.getMatchDetails();
} = hangingProtocolService.getMatchDetails();
setCrosshairsConfiguration(
displaySetMatchDetails,
toolNames,
ToolGroupService,
DisplaySetService
toolGroupService,
displaySetService
);
setFusionActiveVolume(
displaySetMatchDetails,
toolNames,
ToolGroupService,
DisplaySetService
toolGroupService,
displaySetService
);
setWindowLevelActive();
@@ -134,19 +134,19 @@ function modeFactory({ modeConfiguration }) {
},
onModeExit: ({ servicesManager }) => {
const {
ToolGroupService,
SyncGroupService,
toolGroupService,
syncGroupService,
toolbarService,
SegmentationService,
CornerstoneViewportService,
segmentationService,
cornerstoneViewportService,
} = servicesManager.services;
unsubscriptions.forEach(unsubscribe => unsubscribe());
toolbarService.reset();
ToolGroupService.destroy();
SyncGroupService.destroy();
SegmentationService.destroy();
CornerstoneViewportService.destroy();
toolGroupService.destroy();
syncGroupService.destroy();
segmentationService.destroy();
cornerstoneViewportService.destroy();
},
validationTags: {
study: [],
+11 -11
View File
@@ -7,7 +7,7 @@ export const toolGroupIds = {
// MPR: 'mpr',
};
function _initToolGroups(toolNames, Enums, ToolGroupService, commandsManager) {
function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
const tools = {
active: [
{
@@ -65,12 +65,12 @@ function _initToolGroups(toolNames, Enums, ToolGroupService, commandsManager) {
},
};
ToolGroupService.createToolGroupAndAddTools(
toolGroupService.createToolGroupAndAddTools(
toolGroupIds.CT,
tools,
toolsConfig
);
ToolGroupService.createToolGroupAndAddTools(
toolGroupService.createToolGroupAndAddTools(
toolGroupIds.PT,
{
active: tools.active,
@@ -83,12 +83,12 @@ function _initToolGroups(toolNames, Enums, ToolGroupService, commandsManager) {
},
toolsConfig
);
ToolGroupService.createToolGroupAndAddTools(
toolGroupService.createToolGroupAndAddTools(
toolGroupIds.Fusion,
tools,
toolsConfig
);
ToolGroupService.createToolGroupAndAddTools(
toolGroupService.createToolGroupAndAddTools(
toolGroupIds.default,
tools,
toolsConfig
@@ -116,14 +116,14 @@ function _initToolGroups(toolNames, Enums, ToolGroupService, commandsManager) {
},
};
ToolGroupService.createToolGroupAndAddTools(
toolGroupService.createToolGroupAndAddTools(
toolGroupIds.MIP,
mipTools,
mipToolsConfig
);
}
function initMPRToolGroup(toolNames, Enums, ToolGroupService, commandsManager) {
function initMPRToolGroup(toolNames, Enums, toolGroupService, commandsManager) {
const tools = {
active: [
{
@@ -181,12 +181,12 @@ function initMPRToolGroup(toolNames, Enums, ToolGroupService, commandsManager) {
},
};
ToolGroupService.createToolGroupAndAddTools('mpr', tools, toolsConfig);
toolGroupService.createToolGroupAndAddTools('mpr', tools, toolsConfig);
}
function initToolGroups(toolNames, Enums, ToolGroupService, commandsManager) {
_initToolGroups(toolNames, Enums, ToolGroupService, commandsManager);
// initMPRToolGroup(toolNames, Enums, ToolGroupService, commandsManager);
function initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
_initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
// initMPRToolGroup(toolNames, Enums, toolGroupService, commandsManager);
}
export default initToolGroups;
@@ -3,8 +3,8 @@ import { toolGroupIds } from '../initToolGroups';
export default function setCrosshairsConfiguration(
matches,
toolNames,
ToolGroupService,
DisplaySetService
toolGroupService,
displaySetService
) {
const matchDetails = matches.get('ctDisplaySet');
@@ -13,11 +13,11 @@ export default function setCrosshairsConfiguration(
}
const { SeriesInstanceUID } = matchDetails;
const displaySets = DisplaySetService.getDisplaySetsForSeries(
const displaySets = displaySetService.getDisplaySetsForSeries(
SeriesInstanceUID
);
const toolConfig = ToolGroupService.getToolConfiguration(
const toolConfig = toolGroupService.getToolConfiguration(
toolGroupIds.Fusion,
toolNames.Crosshairs
);
@@ -27,7 +27,7 @@ export default function setCrosshairsConfiguration(
filterActorUIDsToSetSlabThickness: [displaySets[0].displaySetInstanceUID],
};
ToolGroupService.setToolConfiguration(
toolGroupService.setToolConfiguration(
toolGroupIds.Fusion,
toolNames.Crosshairs,
crosshairsConfig
@@ -3,8 +3,8 @@ import { toolGroupIds } from '../initToolGroups';
export default function setFusionActiveVolume(
matches,
toolNames,
ToolGroupService,
DisplaySetService
toolGroupService,
displaySetService
) {
const matchDetails = matches.get('ptDisplaySet');
@@ -14,7 +14,7 @@ export default function setFusionActiveVolume(
const { SeriesInstanceUID } = matchDetails;
const displaySets = DisplaySetService.getDisplaySetsForSeries(
const displaySets = displaySetService.getDisplaySetsForSeries(
SeriesInstanceUID
);
@@ -22,12 +22,12 @@ export default function setFusionActiveVolume(
return;
}
const wlToolConfig = ToolGroupService.getToolConfiguration(
const wlToolConfig = toolGroupService.getToolConfiguration(
toolGroupIds.Fusion,
toolNames.WindowLevel
);
const ellipticalToolConfig = ToolGroupService.getToolConfiguration(
const ellipticalToolConfig = toolGroupService.getToolConfiguration(
toolGroupIds.Fusion,
toolNames.EllipticalROI
);
@@ -45,13 +45,13 @@ export default function setFusionActiveVolume(
volumeId,
};
ToolGroupService.setToolConfiguration(
toolGroupService.setToolConfiguration(
toolGroupIds.Fusion,
toolNames.WindowLevel,
windowLevelConfig
);
ToolGroupService.setToolConfiguration(
toolGroupService.setToolConfiguration(
toolGroupIds.Fusion,
toolNames.EllipticalROI,
ellipticalROIConfig