SR viewport to cornerstone viewport consistency updates.
This commit is contained in:
parent
a8954befee
commit
73bb4de140
@ -34,7 +34,7 @@ function OHIFCornerstoneSRViewport({
|
|||||||
const [activeDisplaySetData, setActiveDisplaySetData] = useState({});
|
const [activeDisplaySetData, setActiveDisplaySetData] = useState({});
|
||||||
const [element, setElement] = useState(null);
|
const [element, setElement] = useState(null);
|
||||||
|
|
||||||
const { viewports } = viewportGrid;
|
const { viewports, activeViewportIndex } = viewportGrid;
|
||||||
|
|
||||||
const onElementEnabled = evt => {
|
const onElementEnabled = evt => {
|
||||||
const eventData = evt.detail;
|
const eventData = evt.detail;
|
||||||
@ -161,6 +161,10 @@ function OHIFCornerstoneSRViewport({
|
|||||||
element,
|
element,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const firstViewportIndexWithMatchingDisplaySetUid = viewports.findIndex(
|
||||||
|
vp => vp.displaySetInstanceUID === displaySet.displaySetInstanceUID
|
||||||
|
);
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
let childrenWithProps = null;
|
let childrenWithProps = null;
|
||||||
|
|
||||||
@ -235,8 +239,10 @@ function OHIFCornerstoneSRViewport({
|
|||||||
<>
|
<>
|
||||||
<ViewportActionBar
|
<ViewportActionBar
|
||||||
onSeriesChange={onMeasurementChange}
|
onSeriesChange={onMeasurementChange}
|
||||||
|
showPatientInfo={viewportIndex === activeViewportIndex}
|
||||||
|
showNavArrows={viewportIndex === activeViewportIndex}
|
||||||
studyData={{
|
studyData={{
|
||||||
label: `${measurementSelected + 1}`,
|
label: _viewportLabels[firstViewportIndexWithMatchingDisplaySetUid],
|
||||||
isTracked: false,
|
isTracked: false,
|
||||||
isLocked: false,
|
isLocked: false,
|
||||||
studyDate: StudyDate,
|
studyDate: StudyDate,
|
||||||
@ -264,12 +270,15 @@ function OHIFCornerstoneSRViewport({
|
|||||||
isStackPrefetchEnabled={true} // todo
|
isStackPrefetchEnabled={true} // todo
|
||||||
isPlaying={false}
|
isPlaying={false}
|
||||||
frameRate={24}
|
frameRate={24}
|
||||||
|
isOverlayVisible={false}
|
||||||
/>
|
/>
|
||||||
{childrenWithProps}
|
{childrenWithProps}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const _viewportLabels = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'];
|
||||||
|
|
||||||
OHIFCornerstoneSRViewport.propTypes = {
|
OHIFCornerstoneSRViewport.propTypes = {
|
||||||
displaySet: PropTypes.object.isRequired,
|
displaySet: PropTypes.object.isRequired,
|
||||||
viewportIndex: PropTypes.number.isRequired,
|
viewportIndex: PropTypes.number.isRequired,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user