Skip to content

Adapt Agglomerate Mapping Max Mag to correct value #5222

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

Merged
merged 3 commits into from
Mar 1, 2021
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
4 changes: 3 additions & 1 deletion frontend/javascripts/oxalis/model/sagas/annotation_saga.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import constants from "oxalis/constants";
import messages from "messages";
import { getRequestLogZoomStep } from "oxalis/model/accessors/flycam_accessor";

const MAX_MAG_FOR_AGGLOMERATE_MAPPING = 8;
/* Note that this must stay in sync with the back-end constant
compare https://github.com/scalableminds/webknossos/issues/5223 */
const MAX_MAG_FOR_AGGLOMERATE_MAPPING = 16;

export function* pushAnnotationUpdateAsync(): Saga<void> {
const tracing = yield* select(state => state.tracing);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class BinaryDataService(val dataBaseDir: Path, maxCacheSize: Int, val agglomerat
with DataSetDeleter
with LazyLogging {

/* Note that this must stay in sync with the back-end constant
compare https://github.com/scalableminds/webknossos/issues/5223 */
private val MaxMagForAgglomerateMapping = 16;
lazy val cache = new DataCubeCache(maxCacheSize)

def handleDataRequest(request: DataServiceDataRequest): Fox[Array[Byte]] = {
Expand Down Expand Up @@ -51,7 +54,7 @@ class BinaryDataService(val dataBaseDir: Path, maxCacheSize: Int, val agglomerat
for {
data <- handleDataRequest(request)
mappedData = convertIfNecessary(
request.settings.appliedAgglomerate.isDefined && request.dataLayer.category == Category.segmentation && request.cuboid.resolution.maxDim <= 16,
request.settings.appliedAgglomerate.isDefined && request.dataLayer.category == Category.segmentation && request.cuboid.resolution.maxDim <= MaxMagForAgglomerateMapping,
data,
agglomerateService.applyAgglomerate(request)
)
Expand Down