Skip to content

Commit b7330aa

Browse files
committed
feat: filter annotation updates in CastService to process only ArrowAnnotate annotations
1 parent 1d10bca commit b7330aa

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

extensions/cornerstone/src/services/CastService/CastService.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ export default class CastService extends PubSubService {
192192
return;
193193
}
194194

195+
// Filter: Only process ArrowAnnotate annotations
196+
const toolName = annotation.metadata?.toolName;
197+
if (toolName !== 'ArrowAnnotate') {
198+
console.debug('CastService: Skipping annotation-update for non-arrow annotation:', toolName);
199+
return;
200+
}
201+
195202
const annotationUID = annotation.annotationUID;
196203

197204
// // Skip publishing if this annotation came from Cast (prevent loop)
@@ -1203,4 +1210,3 @@ export default class CastService extends PubSubService {
12031210
}
12041211
}
12051212
}
1206-

extensions/default/src/ViewerLayout/ViewerHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useNavigate, useLocation } from 'react-router-dom';
33
import { useTranslation } from 'react-i18next';
44

55
import { Button, Header, Icons, useModal } from '@ohif/ui-next';
6-
import { useSystem } from '@ohif/core';
6+
import { useSystem, DicomMetadataStore } from '@ohif/core';
77
import { Toolbar } from '../Toolbar/Toolbar';
88
import HeaderPatientInfo from './HeaderPatientInfo';
99
import { PatientInfoVisibility } from './HeaderPatientInfo/HeaderPatientInfo';

platform/app/src/routes/Mode/Mode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect, useState, useRef } from 'react';
22
import { useParams, useLocation } from 'react-router';
33
import PropTypes from 'prop-types';
4-
import { utils } from '@ohif/core';
4+
import { utils, DicomMetadataStore } from '@ohif/core';
55
import { ImageViewerProvider, DragAndDropProvider } from '@ohif/ui-next';
66
import { useSearchParams } from '../../hooks';
77
import { useAppConfig } from '@state';

0 commit comments

Comments
 (0)