feat: improve segment label (#5217)

Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
This commit is contained in:
Pedro KöhlerandJoe Boccanfuso authored and GitHub committed 2025-07-29 22:30:18 -04:00
1 parent dd896fea25
commit 271b84f78f
22 files changed
+163 -44

No files matched your search

+8
View File
@@ -275,6 +275,14 @@ window.config = {
// Could use services manager here to bring up a dialog/modal if needed.
console.warn('test, navigate to https://ohif.org/');
},
// segmentation: {
// segmentLabel: {
// enabledByDefault: true,
// labelColor: [255, 255, 0, 1], // must be an array
// hoverTimeout: 1,
// background: 'rgba(100, 100, 100, 0.5)', // can be any valid css color
// },
// },
// whiteLabeling: {
// createLogoComponentFn: function (React) {
// return React.createElement(
@@ -145,6 +145,7 @@ import {
ToolContract,
ToolExpand,
ToolClickSegment,
ToolSegmentLabel,
} from './Sources/Tools';
import ActionNewDialog from './Sources/ActionNewDialog';
import NotificationInfo from './Sources/NotificationInfo';
@@ -730,6 +731,7 @@ export const Icons = {
'tool-ultrasound-bidirectional': (props: IconProps) => ToolUltrasoundBidirectional(props),
'tool-window-level': (props: IconProps) => ToolWindowLevel(props),
'tool-window-region': (props: IconProps) => ToolWindowRegion(props),
'tool-segment-label': (props: IconProps) => ToolSegmentLabel(props),
'icon-tool-window-region': (props: IconProps) => ToolWindowRegion(props),
'icon-tool-ultrasound-bidirectional': (props: IconProps) => ToolUltrasoundBidirectional(props),
'icon-tool-cobb-angle': (props: IconProps) => ToolCobbAngle(props),
@@ -2983,6 +2983,32 @@ export const ToolUltrasoundBidirectional = (props: IconProps) => (
</svg>
);
export const ToolSegmentLabel = (props: IconProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
{...props}
>
<path
d="M2.6636 14.3578C2.58841 14.4105 2.53094 14.4847 2.49878 14.5707C2.46661 14.6567 2.46127 14.7504 2.48345 14.8395C2.50564 14.9286 2.5543 15.0088 2.62302 15.0697C2.69175 15.1305 2.77731 15.1691 2.86842 15.1804L7.42867 16.5722L8.82125 21.1316C8.83209 21.2229 8.87047 21.3088 8.93131 21.3779C8.99214 21.4469 9.07254 21.4958 9.16181 21.518C9.25109 21.5402 9.34502 21.5348 9.43111 21.5023C9.5172 21.4699 9.59139 21.412 9.6438 21.3364L20.4127 10.5683C20.7607 10.1801 20.9661 9.68484 20.9951 9.16423L21 3.82256C21 3.6044 20.9133 3.39518 20.7591 3.24092C20.6048 3.08666 20.3956 3 20.1774 3H14.8382C14.3176 3.02823 13.8223 3.2334 13.4341 3.58155L2.6636 14.3578Z"
stroke="currentColor"
stroke-width="1.2"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M16.8882 8.75787C15.9796 8.75787 15.2431 8.02133 15.2431 7.11276C15.2431 6.20419 15.9796 5.46765 16.8882 5.46765C17.7968 5.46765 18.5333 6.20419 18.5333 7.11276C18.5333 8.02133 17.7968 8.75787 16.8882 8.75787Z"
stroke="currentColor"
stroke-width="1.2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
);
export const ToolWindowLevel = (props: IconProps) => (
<svg
width="28px"