Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove experimental auto brush feature #6107

Merged
merged 3 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Removed
- The previously disabled Import Skeleton Button has been removed. The functionality is available via the context menu for datasets with active ID mappings. [#6073](https://github.com/scalableminds/webknossos/pull/6073)
- Removes experimental (and hidden) automatic brushing feature. Consequentially, the corresponding feature flag `autoBrushReadyDatasets` is not used, anymore. [#6107](https://github.com/scalableminds/webknossos/pull/6107)

### Breaking Changes
88 changes: 0 additions & 88 deletions frontend/javascripts/libs/floodfill.js

This file was deleted.

1 change: 0 additions & 1 deletion frontend/javascripts/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const settings = {
loadingStrategy: "Loading Strategy",
mergerMode: "Merger Mode",
gpuMemoryFactor: "Hardware Utilization",
autoBrush: "Automatic Brush (Beta)",
overwriteMode: "Volume Annotation Overwrite Mode",
useLegacyBindings: "Classic Controls",
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/javascripts/oxalis/api/api_latest.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import {
getVolumeTracings,
hasVolumeTracings,
} from "oxalis/model/accessors/volumetracing_accessor";
import { getHalfViewportExtentsFromState } from "oxalis/model/sagas/automatic_brush_saga";
import { getHalfViewportExtentsFromState } from "oxalis/model/sagas/saga_selectors";
import {
getLayerBoundaries,
getLayerByName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,6 @@ export class DrawTool {
// Should select cell. Do nothing, since case is covered by leftClick.
return;
}
if (event.ctrlKey && VolumeHandlers.isAutomaticBrushEnabled()) {
return;
}
if (event.ctrlKey && event.shiftKey) {
VolumeHandlers.handleEraseStart(pos, plane);
return;
Expand Down Expand Up @@ -383,8 +380,6 @@ export class DrawTool {
VolumeHandlers.handlePickCell(pos);
} else if (shouldErase) {
// Do nothing. This case is covered by leftMouseDown.
} else if (event.metaKey) {
VolumeHandlers.handleAutoBrush(pos);
}
},

Expand Down Expand Up @@ -516,12 +511,9 @@ export class FillCellTool {
return {
leftClick: (pos: Point2, plane: OrthoView, event: MouseEvent) => {
const shouldPickCell = event.shiftKey && !event.ctrlKey;
const shouldAutoBrush = event.metaKey && VolumeHandlers.isAutomaticBrushEnabled();

if (shouldPickCell) {
VolumeHandlers.handlePickCell(pos);
} else if (shouldAutoBrush) {
VolumeHandlers.handleAutoBrush(pos);
} else {
VolumeHandlers.handleFloodFill(pos, plane);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,13 @@ import {
addToLayerAction,
finishEditingAction,
setContourTracingModeAction,
inferSegmentationInViewportAction,
setActiveCellAction,
resetContourAction,
} from "oxalis/model/actions/volumetracing_actions";
import Model from "oxalis/model";
import Store from "oxalis/store";
import { updateUserSettingAction } from "oxalis/model/actions/settings_actions";
import api from "oxalis/api/internal_api";
import window from "libs/window";

// TODO: Build proper UI for this
window.isAutomaticBrushEnabled = false;
export function isAutomaticBrushEnabled() {
return (
window.isAutomaticBrushEnabled || Store.getState().temporaryConfiguration.isAutoBrushEnabled
);
}

export function handleDrawStart(pos: Point2, plane: OrthoView) {
Store.dispatch(setContourTracingModeAction(ContourModeEnum.DRAW));
Expand Down Expand Up @@ -111,13 +101,6 @@ export function handleFloodFillFromGlobalPosition(globalPos: Vector3, plane: Ort
Store.dispatch(floodFillAction(globalPos, plane));
}

export function handleAutoBrush(pos: Point2) {
if (!isAutomaticBrushEnabled()) {
return;
}
Store.dispatch(inferSegmentationInViewportAction(calculateGlobalPos(Store.getState(), pos)));
}

const MAX_BRUSH_CHANGE_VALUE = 5;
const BRUSH_CHANGING_CONSTANT = 0.02;

Expand Down
1 change: 0 additions & 1 deletion frontend/javascripts/oxalis/default_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ const defaultState: OxalisState = {
hoveredSegmentId: 0,
activeMappingByLayer: {},
isMergerModeEnabled: false,
isAutoBrushEnabled: false,
gpuSetup: {
smallestCommonBucketCapacity:
Constants.GPU_FACTOR_MULTIPLIER * Constants.DEFAULT_GPU_MEMORY_FACTOR,
Expand Down
12 changes: 0 additions & 12 deletions frontend/javascripts/oxalis/model/actions/volumetracing_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ export type FinishAnnotationStrokeAction = { type: "FINISH_ANNOTATION_STROKE", t
type SetMousePositionAction = { type: "SET_MOUSE_POSITION", position: ?Vector2 };
type HideBrushAction = { type: "HIDE_BRUSH" };
type SetContourTracingModeAction = { type: "SET_CONTOUR_TRACING_MODE", mode: ContourMode };
export type InferSegmentationInViewportAction = {
type: "INFER_SEGMENT_IN_VIEWPORT",
position: Vector3,
};
export type ImportVolumeTracingAction = { type: "IMPORT_VOLUMETRACING" };
export type SetMaxCellAction = { type: "SET_MAX_CELL", cellId: number };
export type SetSegmentsAction = {
Expand Down Expand Up @@ -102,7 +98,6 @@ export type VolumeTracingAction =
| SetMousePositionAction
| HideBrushAction
| CopySegmentationLayerAction
| InferSegmentationInViewportAction
| SetContourTracingModeAction
| SetSegmentsAction
| UpdateSegmentAction
Expand Down Expand Up @@ -249,13 +244,6 @@ export const addBucketToUndoAction = (
tracingId,
});

export const inferSegmentationInViewportAction = (
position: Vector3,
): InferSegmentationInViewportAction => ({
type: "INFER_SEGMENT_IN_VIEWPORT",
position,
});

export const importVolumeTracingAction = (): ImportVolumeTracingAction => ({
type: "IMPORT_VOLUMETRACING",
});
Expand Down
Loading