Skip to content
Open
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
8 changes: 3 additions & 5 deletions src/datasource/catmaid/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ import type { Borrowed } from "#src/util/disposable.js";
import { mat4, vec3 } from "#src/util/geom.js";
import "#src/datasource/catmaid/register_credentials_provider.js";

const METERS_PER_NANOMETER = 1e-9;

export class CatmaidSpatiallyIndexedSkeletonSource
extends WithParameters(
WithCredentialsProvider<CatmaidToken>()(SpatiallyIndexedSkeletonSource),
Expand Down Expand Up @@ -429,9 +427,9 @@ export class CatmaidDataSourceProvider implements DataSourceProvider {

// The model-space coordinates we emit are in nanometers, converted to meters for Neuroglancer.
const coordinateScaleFactors = Float64Array.from([
METERS_PER_NANOMETER,
METERS_PER_NANOMETER,
METERS_PER_NANOMETER,
1e-9,
1e-9,
1e-9,
]);

// Bounds and chunk sizes are represented in project-space nanometers.
Expand Down
10 changes: 5 additions & 5 deletions src/datasource/graphene/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ class GraphConnection extends SegmentationGraphSourceConnection {
return undefined;
}

getMeshSource() {
getMeshSource(): MeshSource | undefined {
const { layer } = this;
for (const dataSource of layer.dataSources) {
const { loadState } = dataSource;
Expand All @@ -1351,17 +1351,17 @@ class GraphConnection extends SegmentationGraphSourceConnection {
(subsource) => subsource.id === "mesh",
)[0];
if (meshSubsource) {
return meshSubsource.subsource.mesh;
// `DataSubsource.mesh` is widened for spatial skeleton support, but Graphene
// segment updates still target mesh sources.
return meshSubsource.subsource.mesh as MeshSource | undefined;
}
}
}
return undefined;
}

meshAddNewSegments(segments: bigint[]) {
// `DataSubsource.mesh` is widened for spatial skeleton support, but Graphene
// segment updates still target mesh sources.
const meshSource = this.getMeshSource() as MeshSource | undefined;
const meshSource = this.getMeshSource();
if (meshSource) {
for (const segment of segments) {
meshSource.rpc!.invoke(GRAPHENE_MESH_NEW_SEGMENT_RPC_ID, {
Expand Down
Loading