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:
1 parent
a97fb2fc9a
commit
8af0362d12
97 files changed
+934
-908
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Extracts the label from the toolData imported from dcmjs. We need to do this
|
||||
* as dcmjs does not depeend on OHIF/the MeasurementService, it just produces data for cornestoneTools.
|
||||
* as dcmjs does not depeend on OHIF/the measurementService, it just produces data for cornestoneTools.
|
||||
* This optional data is available for the consumer to process if they wish to.
|
||||
* @param {object} toolData The tooldata relating to the
|
||||
*
|
||||
|
||||
@@ -20,14 +20,14 @@ export default function hydrateStructuredReport(
|
||||
displaySetInstanceUID
|
||||
) {
|
||||
const dataSource = extensionManager.getActiveDataSource()[0];
|
||||
const { MeasurementService, DisplaySetService } = servicesManager.services;
|
||||
const { measurementService, displaySetService } = servicesManager.services;
|
||||
|
||||
const displaySet = DisplaySetService.getDisplaySetByUID(
|
||||
const displaySet = displaySetService.getDisplaySetByUID(
|
||||
displaySetInstanceUID
|
||||
);
|
||||
|
||||
// TODO -> We should define a strict versioning somewhere.
|
||||
const mappings = MeasurementService.getSourceMappings(
|
||||
const mappings = measurementService.getSourceMappings(
|
||||
CORNERSTONE_3D_TOOLS_SOURCE_NAME,
|
||||
CORNERSTONE_3D_TOOLS_SOURCE_VERSION
|
||||
);
|
||||
@@ -166,7 +166,7 @@ export default function hydrateStructuredReport(
|
||||
},
|
||||
};
|
||||
|
||||
const source = MeasurementService.getSource(
|
||||
const source = measurementService.getSource(
|
||||
CORNERSTONE_3D_TOOLS_SOURCE_NAME,
|
||||
CORNERSTONE_3D_TOOLS_SOURCE_VERSION
|
||||
);
|
||||
@@ -176,7 +176,7 @@ export default function hydrateStructuredReport(
|
||||
m => m.annotationType === annotationType
|
||||
);
|
||||
|
||||
MeasurementService.addRawMeasurement(
|
||||
measurementService.addRawMeasurement(
|
||||
source,
|
||||
annotationType,
|
||||
{ annotation },
|
||||
|
||||
@@ -6,11 +6,11 @@ const supportedLegacyCornerstoneTags = ['cornerstoneTools@^4.0.0'];
|
||||
const CORNERSTONE_3D_TAG = cornerstoneAdapters.CORNERSTONE_3D_TAG;
|
||||
|
||||
/**
|
||||
* Checks if the given `displaySet`can be rehydrated into the `MeasurementService`.
|
||||
* Checks if the given `displaySet`can be rehydrated into the `measurementService`.
|
||||
*
|
||||
* @param {object} displaySet The SR `displaySet` to check.
|
||||
* @param {object[]} mappings The CornerstoneTools 4 mappings to the `MeasurementService`.
|
||||
* @returns {boolean} True if the SR can be rehydrated into the `MeasurementService`.
|
||||
* @param {object[]} mappings The CornerstoneTools 4 mappings to the `measurementService`.
|
||||
* @returns {boolean} True if the SR can be rehydrated into the `measurementService`.
|
||||
*/
|
||||
export default function isRehydratable(displaySet, mappings) {
|
||||
if (!mappings || !mappings.length) {
|
||||
@@ -30,7 +30,7 @@ export default function isRehydratable(displaySet, mappings) {
|
||||
|
||||
adapterKeys.forEach(key => {
|
||||
if (mappingDefinitions.includes(key)) {
|
||||
// Must have both a dcmjs adapter and a MeasurementService
|
||||
// Must have both a dcmjs adapter and a measurementService
|
||||
// Definition in order to be a candidate for import.
|
||||
adapters.push(cornerstoneAdapters[key]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user