feat(ViewportActionMenu): window level per viewport / new patient info / colorbars/ 3D presets and 3D volume rendering (#3963)
Co-authored-by: Joe Boccanfuso <109477394+jbocce@users.noreply.github.com>
This commit is contained in:
1 parent
07301fc020
commit
b7f90e3951
164 files changed
+5887
-932
No files matched your search
@@ -24,43 +24,11 @@ function ThumbnailTracked({
|
||||
onClick,
|
||||
onDoubleClick,
|
||||
onClickUntrack,
|
||||
viewportIdentificator,
|
||||
isTracked,
|
||||
isActive,
|
||||
}) {
|
||||
const { t } = useTranslation('ThumbnailTracked');
|
||||
const trackedIcon = isTracked ? 'circled-checkmark' : 'dotted-circle';
|
||||
const viewportIdentificatorLabel = viewportIdentificator.join(', ');
|
||||
const renderViewportLabels = () => {
|
||||
const MAX_LABELS_PER_COL = 3;
|
||||
const shouldShowStack = viewportIdentificator.length > MAX_LABELS_PER_COL;
|
||||
if (shouldShowStack) {
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
{viewportIdentificator.slice(0, MAX_LABELS_PER_COL).map(label => (
|
||||
<div key={label}>{label}</div>
|
||||
))}
|
||||
</div>
|
||||
<Tooltip
|
||||
position="right"
|
||||
content={
|
||||
<div className="max-w-40 text-left">
|
||||
{`${t('Viewport')}: ${viewportIdentificatorLabel}`}
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<Icon
|
||||
name="tool-more-menu"
|
||||
className="py-2 text-white"
|
||||
/>
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return viewportIdentificator.map(label => <div key={label}>{label}</div>);
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -93,9 +61,6 @@ function ThumbnailTracked({
|
||||
{isTracked ? t('Series is tracked') : t('Series is untracked')}
|
||||
</span>
|
||||
</span>
|
||||
{!!viewportIdentificator.length && (
|
||||
<span>{`${t('Viewport')}: ${viewportIdentificatorLabel}`}</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -105,13 +70,6 @@ function ThumbnailTracked({
|
||||
className="text-primary-light mb-2 w-4"
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
<div
|
||||
className="text-center text-xl leading-tight text-white"
|
||||
data-cy={'thumbnail-viewport-labels'}
|
||||
>
|
||||
{renderViewportLabels()}
|
||||
</div>
|
||||
</div>
|
||||
{isTracked && (
|
||||
<div onClick={onClickUntrack}>
|
||||
@@ -162,7 +120,6 @@ ThumbnailTracked.propTypes = {
|
||||
onClick: PropTypes.func.isRequired,
|
||||
onDoubleClick: PropTypes.func.isRequired,
|
||||
onClickUntrack: PropTypes.func.isRequired,
|
||||
viewportIdentificator: PropTypes.array,
|
||||
isTracked: PropTypes.bool,
|
||||
messages: PropTypes.object,
|
||||
isActive: PropTypes.bool.isRequired,
|
||||
|
||||
Reference in new issue
Block a user