diff --git a/monailabel/tasks/infer/bundle.py b/monailabel/tasks/infer/bundle.py index 12b03ffb1..10d4e283a 100644 --- a/monailabel/tasks/infer/bundle.py +++ b/monailabel/tasks/infer/bundle.py @@ -18,7 +18,7 @@ from monai.bundle import ConfigItem, ConfigParser from monai.inferers import Inferer, SimpleInferer -from monai.transforms import Compose, Invertd, LoadImaged, SaveImaged, CropForegroundd +from monai.transforms import Compose, CropForegroundd, Invertd, LoadImaged, SaveImaged from monailabel.interfaces.tasks.infer_v2 import InferType from monailabel.tasks.infer.basic_infer import BasicInferTask diff --git a/plugins/ohifv3/extensions/monai-label/src/components/actions/AutoSegmentation.tsx b/plugins/ohifv3/extensions/monai-label/src/components/actions/AutoSegmentation.tsx index f4b079c3f..2bd0efa35 100644 --- a/plugins/ohifv3/extensions/monai-label/src/components/actions/AutoSegmentation.tsx +++ b/plugins/ohifv3/extensions/monai-label/src/components/actions/AutoSegmentation.tsx @@ -26,12 +26,12 @@ export default class AutoSegmentation extends BaseTab { if (this.props.viewConstants.SupportedClasses) { const labels = this.props.viewConstants.SupportedClasses - let labelIndex = 1; + let labelIndex = 1; for (const key in labels) { const organName = labels[key]; if (organName.toLowerCase() !== 'background') { - const hexColor = segmentColors[labelIndex] || '#000000'; + const hexColor = segmentColors[labelIndex] || '#000000'; selectedOrgans[organName] = { checked: false, color: hexColor }; labelIndex++; @@ -106,13 +106,13 @@ export default class AutoSegmentation extends BaseTab { onChangeOrgans = (organ, evt) => { this.setState((prevState) => { - const selectedOrgans = { ...prevState.selectedOrgans }; + const selectedOrgans = { ...prevState.selectedOrgans }; selectedOrgans[organ] = { ...selectedOrgans[organ], checked: evt.target.checked, }; - + return { selectedOrgans }; }); }; diff --git a/plugins/ohifv3/extensions/monai-label/src/components/actions/PointPrompts.tsx b/plugins/ohifv3/extensions/monai-label/src/components/actions/PointPrompts.tsx index a77e2388c..e4e2f7f6d 100644 --- a/plugins/ohifv3/extensions/monai-label/src/components/actions/PointPrompts.tsx +++ b/plugins/ohifv3/extensions/monai-label/src/components/actions/PointPrompts.tsx @@ -48,12 +48,12 @@ export default class PointPrompts extends BaseTab { if (this.props.viewConstants.SupportedClasses) { const labels = this.props.viewConstants.SupportedClasses - let labelIndex = 1; + let labelIndex = 1; for (const key in labels) { const organName = labels[key]; if (organName.toLowerCase() !== 'background') { - const hexColor = segmentColors[labelIndex] || '#000000'; + const hexColor = segmentColors[labelIndex] || '#000000'; selectedOrgans[organName] = { checked: false, color: hexColor }; labelIndex++; } @@ -104,7 +104,7 @@ export default class PointPrompts extends BaseTab { annotation.data.label === "" ) { annotation.data.label = currentLabel - clickPoints[label][annotationGroupKey].ProbeMONAILabel.push(annotation); + clickPoints[label][annotationGroupKey].ProbeMONAILabel.push(annotation); } }); } @@ -126,7 +126,7 @@ export default class PointPrompts extends BaseTab { const config = this.props.onOptionsConfig(); const params = config && config.infer && config.infer[model] ? config.infer[model] : {}; - + const { cornerstoneViewportService, viewportGridService} = this.props.servicesManager.services; const viewPort = cornerstoneViewportService.viewportsById.get('mpr-axial'); @@ -181,8 +181,8 @@ export default class PointPrompts extends BaseTab { const updatedParams = { - ...params, - ...data + ...params, + ...data }; const labels = info.models[model].labels; @@ -214,13 +214,13 @@ export default class PointPrompts extends BaseTab { onChangeOrgans = (organ, evt) => { this.setState((prevState) => { - const selectedOrgans = { ...prevState.selectedOrgans }; + const selectedOrgans = { ...prevState.selectedOrgans }; selectedOrgans[organ] = { ...selectedOrgans[organ], checked: evt.target.checked, }; - + return { selectedOrgans }; }); }; @@ -308,7 +308,7 @@ export default class PointPrompts extends BaseTab { annotation.data.label === "" ) { annotation.data.label = prev - clickPoints[label][annotationGroupKey].ProbeMONAILabel.push(annotation); + clickPoints[label][annotationGroupKey].ProbeMONAILabel.push(annotation); } }); } @@ -399,7 +399,7 @@ export default class PointPrompts extends BaseTab { {Object.entries(this.state.selectedOrgans).map(([organ, { color, checked }]) => ( - +