ohif-viewer/extensions/tmtv/src/getPanelModule.tsx
Leonardo Campos d57e8bc157
feat(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode (#3664)
Co-authored-by: Alireza <ar.sedghi@gmail.com>
Co-authored-by: Neil <neil.a.macphee@gmail.com>
2024-04-09 23:57:34 -04:00

71 lines
1.6 KiB
TypeScript

import React from 'react';
import { PanelPetSUV, PanelROIThresholdExport } from './Panels';
import { Toolbox } from '@ohif/ui';
// TODO:
// - No loading UI exists yet
// - cancel promises when component is destroyed
// - show errors in UI for thumbnails if promise fails
function getPanelModule({ commandsManager, extensionManager, servicesManager }) {
const wrappedPanelPetSuv = () => {
return (
<PanelPetSUV
commandsManager={commandsManager}
servicesManager={servicesManager}
/>
);
};
const wrappedROIThresholdToolbox = () => {
return (
<>
<Toolbox
commandsManager={commandsManager}
servicesManager={servicesManager}
extensionManager={extensionManager}
buttonSectionId="ROIThresholdToolbox"
title="Threshold Tools"
/>
</>
);
};
const wrappedROIThresholdExport = () => {
return (
<>
<PanelROIThresholdExport
commandsManager={commandsManager}
servicesManager={servicesManager}
/>
</>
);
};
return [
{
name: 'petSUV',
iconName: 'tab-patient-info',
iconLabel: 'Patient Info',
label: 'Patient Info',
component: wrappedPanelPetSuv,
},
{
name: 'tmtvBox',
iconName: 'tab-segmentation',
iconLabel: 'Segmentation',
label: 'Segmentation Toolbox',
component: wrappedROIThresholdToolbox,
},
{
name: 'tmtvExport',
iconName: 'tab-segmentation',
iconLabel: 'Segmentation',
label: 'Segmentation Export',
component: wrappedROIThresholdExport,
},
];
}
export default getPanelModule;