import React from 'react'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Label, Input, Button, } from '@ohif/ui-next'; import { useTranslation } from 'react-i18next'; export const ROI_STAT = 'roi_stat'; const RANGE = 'range'; function ROIThresholdConfiguration({ config, dispatch, runCommand }) { const { t } = useTranslation('ROIThresholdConfiguration'); const options = [ { value: ROI_STAT, label: t('Max'), placeHolder: t('Max') }, { value: RANGE, label: t('Range'), placeHolder: t('Range') }, ]; const handlePercentageOfMaxSUVChange = (e: React.ChangeEvent) => { let value = e.target.value; if (value === '.') { value = '0.'; } if (isNaN(Number(value)) || Number(value) < 0 || Number(value) > 1) { return; } dispatch({ type: 'setWeight', payload: { weight: value } }); }; return (
{/* The original panel design does not include "Strategy," but it was found in the code. Need to determine if it should be included or removed. */}
{config.strategy === ROI_STAT && (
)} {config.strategy !== ROI_STAT && (
{/* Header */} {/* CT Row */}
{ dispatch({ type: 'setThreshold', payload: { ctLower: e.target.value } }); }} />
{ dispatch({ type: 'setThreshold', payload: { ctUpper: e.target.value } }); }} />
{/* PT Row */}
{ dispatch({ type: 'setThreshold', payload: { ptLower: e.target.value } }); }} />
{ dispatch({ type: 'setThreshold', payload: { ptUpper: e.target.value } }); }} />
)}
); } export default ROIThresholdConfiguration;