feat(findingSite): Allow customizing the measurement panel and show site/finding (#3155)
* feat: Allow customizing the measurements panel. Also includes default display of the site/finding values from the DICOM SR object. Update fixes PR review comments - move the recordInteraction to COmmandsManager.run PR fixes fix: Dependency updates to allow right click to be recognized PR fixes * Use newer CSWIL * Make both the base measurements and the tracking measurements show codes * Fix the right click context menu bringing up menu
This commit is contained in:
1 parent
dd22e37e4c
commit
8e9d7bd2bb
10 files changed
+152
-48
No files matched your search
@@ -11,6 +11,7 @@ const MeasurementItem = ({
|
||||
isActive,
|
||||
onClick,
|
||||
onEdit,
|
||||
item,
|
||||
}) => {
|
||||
const [isHovering, setIsHovering] = useState(false);
|
||||
|
||||
|
||||
@@ -1,13 +1,31 @@
|
||||
import React from 'react';
|
||||
import { ServicesManager } from '@ohif/core';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import MeasurementItem from './MeasurementItem';
|
||||
|
||||
const MeasurementTable = ({ data, title, onClick, onEdit }) => {
|
||||
const MeasurementTable = ({
|
||||
data,
|
||||
title,
|
||||
onClick,
|
||||
onEdit,
|
||||
servicesManager,
|
||||
}) => {
|
||||
servicesManager = servicesManager as ServicesManager;
|
||||
const { customizationService } = servicesManager.services;
|
||||
const { t } = useTranslation('MeasurementTable');
|
||||
const amount = data.length;
|
||||
|
||||
const itemCustomization = customizationService.getCustomization(
|
||||
'MeasurementItem',
|
||||
{
|
||||
content: MeasurementItem,
|
||||
contentProps: {},
|
||||
}
|
||||
);
|
||||
const CustomMeasurementItem = itemCustomization.content;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex justify-between px-2 py-1 bg-secondary-main">
|
||||
@@ -19,13 +37,14 @@ const MeasurementTable = ({ data, title, onClick, onEdit }) => {
|
||||
<div className="overflow-hidden ohif-scrollbar max-h-112">
|
||||
{data.length !== 0 &&
|
||||
data.map((measurementItem, index) => (
|
||||
<MeasurementItem
|
||||
<CustomMeasurementItem
|
||||
key={measurementItem.uid}
|
||||
uid={measurementItem.uid}
|
||||
index={index + 1}
|
||||
label={measurementItem.label}
|
||||
isActive={measurementItem.isActive}
|
||||
displayText={measurementItem.displayText}
|
||||
item={measurementItem}
|
||||
onClick={onClick}
|
||||
onEdit={onEdit}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user