feat: Viewport API + Documentation Page
This commit is contained in:
1 parent
5f9535a74b
commit
12d1ff6bea
6 files changed
+254
-71
No files matched your search
@@ -1,38 +1,62 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ViewportActionBar, Notification, Button } from '@ohif/ui';
|
||||
|
||||
const Viewport = ({
|
||||
viewportIndex,
|
||||
onSeriesChange,
|
||||
studyData,
|
||||
isTracked,
|
||||
studyDate,
|
||||
modality,
|
||||
currentSeries,
|
||||
patientInformation,
|
||||
activeViewportIndex,
|
||||
children,
|
||||
}) => {
|
||||
const Viewport = ({ viewportIndex, onSeriesChange, studyData, children }) => {
|
||||
return (
|
||||
<div className="flex flex-col h-full">
|
||||
<ViewportActionBar isTracked modality={modality} />
|
||||
<div className="flex flex-col h-full relative">
|
||||
<div className="absolute top-0 left-0 w-full">
|
||||
<ViewportActionBar
|
||||
onSeriesChange={onSeriesChange}
|
||||
studyData={studyData}
|
||||
/>
|
||||
|
||||
{/* TODO: NOTIFICATION API DEFINITION - OHIF-112 */}
|
||||
<Notification
|
||||
text="Track all measurement for this series?"
|
||||
type="info"
|
||||
actionButtons={
|
||||
<div>
|
||||
<Button>No</Button>
|
||||
<Button className="ml-2">No, do not ask again</Button>
|
||||
<Button className="ml-2" color="primary">
|
||||
Yes
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
{/* TODO: NOTIFICATION API DEFINITION - OHIF-112 */}
|
||||
<Notification
|
||||
text="Track all measurement for this series?"
|
||||
type="info"
|
||||
actionButtons={
|
||||
<div>
|
||||
<Button>No</Button>
|
||||
<Button className="ml-2">No, do not ask again</Button>
|
||||
<Button className="ml-2" color="primary">
|
||||
Yes
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* STUDY IMAGE */}
|
||||
<div className="w-full h-full" id={`viewport-${viewportIndex}`}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Viewport.propTypes = {
|
||||
viewportIndex: PropTypes.number.isRequired,
|
||||
onSeriesChange: PropTypes.func.isRequired,
|
||||
studyData: PropTypes.shape({
|
||||
label: PropTypes.string.isRequired,
|
||||
isTracked: PropTypes.bool.isRequired,
|
||||
isLocked: PropTypes.bool.isRequired,
|
||||
studyDate: PropTypes.string.isRequired,
|
||||
currentSeries: PropTypes.number.isRequired,
|
||||
seriesDescription: PropTypes.string.isRequired,
|
||||
modality: PropTypes.string.isRequired,
|
||||
patientInformation: PropTypes.shape({
|
||||
patientName: PropTypes.string.isRequired,
|
||||
patientSex: PropTypes.string.isRequired,
|
||||
patientAge: PropTypes.string.isRequired,
|
||||
MRN: PropTypes.string.isRequired,
|
||||
thickness: PropTypes.string.isRequired,
|
||||
spacing: PropTypes.string.isRequired,
|
||||
scanner: PropTypes.string.isRequired,
|
||||
}),
|
||||
}).isRequired,
|
||||
children: PropTypes.node.isRequired,
|
||||
};
|
||||
|
||||
export default Viewport;
|
||||
Reference in new issue
Block a user