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

@@ -71,8 +71,8 @@ function _getDisplaySetsFromSeries(
displaySet.referencedSeriesInstanceUID = referencedSeries.SeriesInstanceUID;
displaySet.getReferenceDisplaySet = () => {
const { DisplaySetService } = servicesManager.services;
const referencedDisplaySets = DisplaySetService.getDisplaySetsForSeries(
const { displaySetService } = servicesManager.services;
const referencedDisplaySets = displaySetService.getDisplaySetsForSeries(
displaySet.referencedSeriesInstanceUID
);
@@ -113,9 +113,9 @@ function _load(segDisplaySet, servicesManager, extensionManager, headers) {
// We don't want to fire multiple loads, so we'll wait for the first to finish
// and also return the same promise to any other callers.
loadPromises[SOPInstanceUID] = new Promise(async (resolve, reject) => {
const { SegmentationService } = servicesManager.services;
const { segmentationService } = servicesManager.services;
if (_segmentationExistsInCache(segDisplaySet, SegmentationService)) {
if (_segmentationExistsInCache(segDisplaySet, segmentationService)) {
return;
}
@@ -133,7 +133,7 @@ function _load(segDisplaySet, servicesManager, extensionManager, headers) {
}
const suppressEvents = true;
SegmentationService.createSegmentationForSEGDisplaySet(
segmentationService.createSegmentationForSEGDisplaySet(
segDisplaySet,
null,
suppressEvents
@@ -175,10 +175,10 @@ async function _loadSegments(extensionManager, segDisplaySet, headers) {
return segments;
}
function _segmentationExistsInCache(segDisplaySet, SegmentationService) {
function _segmentationExistsInCache(segDisplaySet, segmentationService) {
// This should be abstracted with the CornerstoneCacheService
const labelmapVolumeId = segDisplaySet.displaySetInstanceUID;
const segVolume = SegmentationService.getLabelmapVolume(labelmapVolumeId);
const segVolume = segmentationService.getLabelmapVolume(labelmapVolumeId);
return segVolume !== undefined;
}