feat(SR): SCOORD3D point annotations support for stack viewports (#4315)
This commit is contained in:
1 parent
e0fca8c88c
commit
ac1cad25af
51 files changed
+978
-607
No files matched your search
@@ -1,9 +1,14 @@
|
||||
import { addTool, RectangleROIStartEndThresholdTool, CircleROIStartEndThresholdTool } from '@cornerstonejs/tools';
|
||||
import {
|
||||
addTool,
|
||||
RectangleROIStartEndThresholdTool,
|
||||
CircleROIStartEndThresholdTool,
|
||||
} from '@cornerstonejs/tools';
|
||||
import { Enums as CSExtensionEnums } from '@ohif/extension-cornerstone';
|
||||
|
||||
import measurementServiceMappingsFactory from './utils/measurementServiceMappings/measurementServiceMappingsFactory';
|
||||
|
||||
const CORNERSTONE_3D_TOOLS_SOURCE_NAME = 'Cornerstone3DTools';
|
||||
const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';
|
||||
const { CORNERSTONE_3D_TOOLS_SOURCE_NAME, CORNERSTONE_3D_TOOLS_SOURCE_VERSION } = CSExtensionEnums;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} servicesManager
|
||||
@@ -17,11 +22,12 @@ export default function init({ servicesManager }) {
|
||||
addTool(RectangleROIStartEndThresholdTool);
|
||||
addTool(CircleROIStartEndThresholdTool);
|
||||
|
||||
const { RectangleROIStartEndThreshold, CircleROIStartEndThreshold } = measurementServiceMappingsFactory(
|
||||
measurementService,
|
||||
displaySetService,
|
||||
cornerstoneViewportService
|
||||
);
|
||||
const { RectangleROIStartEndThreshold, CircleROIStartEndThreshold } =
|
||||
measurementServiceMappingsFactory(
|
||||
measurementService,
|
||||
displaySetService,
|
||||
cornerstoneViewportService
|
||||
);
|
||||
|
||||
const csTools3DVer1MeasurementSource = measurementService.getSource(
|
||||
CORNERSTONE_3D_TOOLS_SOURCE_NAME,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import SUPPORTED_TOOLS from './constants/supportedTools';
|
||||
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
||||
import { getSOPInstanceAttributes } from '@ohif/extension-cornerstone';
|
||||
|
||||
const CircleROIStartEndThreshold = {
|
||||
toAnnotation: (measurement, definition) => { },
|
||||
toAnnotation: (measurement, definition) => {},
|
||||
|
||||
/**
|
||||
* Maps cornerstone annotation event data to measurement service format.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import SUPPORTED_TOOLS from './constants/supportedTools';
|
||||
import getSOPInstanceAttributes from './utils/getSOPInstanceAttributes';
|
||||
import { getSOPInstanceAttributes } from '@ohif/extension-cornerstone';
|
||||
|
||||
const RectangleROIStartEndThreshold = {
|
||||
toAnnotation: (measurement, definition) => {},
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import RectangleROIStartEndThreshold from './RectangleROIStartEndThreshold';
|
||||
import CircleROIStartEndThreshold from './CircleROIStartEndThreshold'
|
||||
import CircleROIStartEndThreshold from './CircleROIStartEndThreshold';
|
||||
|
||||
const measurementServiceMappingsFactory = (
|
||||
measurementService,
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
import { metaData } from '@cornerstonejs/core';
|
||||
|
||||
export default function getSOPInstanceAttributes(imageId) {
|
||||
if (imageId) {
|
||||
return _getUIDFromImageID(imageId);
|
||||
}
|
||||
}
|
||||
|
||||
function _getUIDFromImageID(imageId) {
|
||||
const instance = metaData.get('instance', imageId);
|
||||
|
||||
return {
|
||||
SOPInstanceUID: instance.SOPInstanceUID,
|
||||
SeriesInstanceUID: instance.SeriesInstanceUID,
|
||||
StudyInstanceUID: instance.StudyInstanceUID,
|
||||
frameNumber: instance.frameNumber || 1,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user