Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 31, 2024
1 parent 3b2beb5 commit 71dfeef
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion monailabel/tasks/infer/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions plugins/ohifv3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ You can then visit http://127.0.0.1:3000/ohif/ on your browser to see the runnin
### VISTA Interactive Models example

```bash
# use local monialbel build if monailabel is not the latest tagged.
# use local monialbel build if monailabel is not the latest tagged.

# git clone https://github.com/Project-MONAI/MONAILabel.git

# git switch to the branch neede.
# git switch to the branch neede.

# command to start monailabel server with vista3d
'path/to/MONAILabel/monailabel/scripts/monailabel' start_server --app sample-apps/monaibundle --studies http://127.0.0.1:8042/dicom-web --conf models vista3d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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 };
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down Expand Up @@ -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);
}
});
}
Expand All @@ -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');
Expand Down Expand Up @@ -181,8 +181,8 @@ export default class PointPrompts extends BaseTab {


const updatedParams = {
...params,
...data
...params,
...data
};
const labels = info.models[model].labels;

Expand Down Expand Up @@ -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 };
});
};
Expand Down Expand Up @@ -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);
}
});
}
Expand Down Expand Up @@ -399,7 +399,7 @@ export default class PointPrompts extends BaseTab {
</tr>

{Object.entries(this.state.selectedOrgans).map(([organ, { color, checked }]) => (

<tr
key={organ}
className='clickable-row'
Expand Down
2 changes: 1 addition & 1 deletion plugins/ohifv3/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ cp -r ../../monailabel/endpoints/static/ohif www/html/ohif
cp -f config/monai_label.js www/html/ohif/app-config.js

# nginx -p `pwd` -c config/nginx.conf -e logs/error.log
nginx -p `pwd` -c config/nginx.conf
nginx -p `pwd` -c config/nginx.conf

0 comments on commit 71dfeef

Please sign in to comment.