Skip to content

Commit 2dc4df5

Browse files
committed
--wip-- [skip ci]
1 parent 7f1a420 commit 2dc4df5

File tree

4 files changed

+36
-23
lines changed

4 files changed

+36
-23
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ errorShots/
8282
flow-coverage/
8383

8484

85-
# Sublime
85+
# Sublime
8686
*.sublime-project
8787
*.sublime-workspace
8888

@@ -102,7 +102,7 @@ metals.sbt
102102
**/screenshots/*.diff.png
103103
**/screenshots/*.new.png
104104

105-
# Yarn
105+
# Yarn
106106
.yarn/*
107107
!.yarn/cache
108108
!.yarn/patches

docker-compose.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ version: "2.2"
33
services:
44
# Production
55
webknossos:
6-
build:
7-
context: .
8-
dockerfile: Dockerfile
9-
cache_from:
10-
- scalableminds/webknossos
11-
- scalableminds/webknossos:${DEV_CACHE:-master}
6+
build: .
127
image: scalableminds/webknossos:${DOCKER_TAG:-master}
138
ports:
149
- "9000:9000"
@@ -105,8 +100,6 @@ services:
105100
- CERTIFICATE_PUBLIC_KEY
106101
- TZ=${TZ:-Europe/Berlin}
107102
- POSTGRES_URL=jdbc:postgresql://postgres/webknossos
108-
- POSTGRES_USER=webknossos_user
109-
- POSTGRES_PASSWORD=secret_password
110103
- HOME=/root
111104
- CIRCLE_TAG=${CIRCLE_TAG}
112105
- CIRCLE_BUILD_NUM=${CIRCLE_BUILD_NUM}
@@ -205,7 +198,7 @@ services:
205198
-Ddatastore.redis.address=redis
206199
-Ddatastore.watchFileSystem.enabled=false"
207200
volumes:
208-
- ./binaryData/Organization_X:/home/${USER_NAME:-sbt-user}/webknossos/binaryData/Organization_X
201+
- ./binaryData/Connectomics department:/home/${USER_NAME:-sbt-user}/webknossos/binaryData/Organization_X
209202

210203
screenshot-tests:
211204
image: scalableminds/puppeteer:master
@@ -218,6 +211,12 @@ services:
218211
- ".:/home/pptruser/webknossos"
219212
user: ${USER_UID:-1000}:${USER_GID:-1000}
220213

214+
# webKnossos-connect
215+
webknossos-connect:
216+
image: scalableminds/webknossos-connect:master__205
217+
volumes:
218+
- "./conf/connect:/app/data"
219+
221220
# Postgres
222221
postgres:
223222
image: postgres:10-alpine
@@ -226,7 +225,7 @@ services:
226225
- POSTGRES_USER=webknossos_user
227226
- POSTGRES_PASSWORD=secret_password
228227
healthcheck:
229-
test: ["CMD-SHELL", "pg_isready -d webknossos -U webknossos_user -h 127.0.0.1 -p 5432"]
228+
test: ["CMD-SHELL", "pg_isready -U postgres -h 127.0.0.1 -p 5432"]
230229
interval: 2s
231230
timeout: 5s
232231
retries: 30
@@ -237,7 +236,7 @@ services:
237236
ports:
238237
- "5434:5432"
239238
volumes:
240-
- "./pg/db:/var/lib/postgresql/data/"
239+
- "./pg.old/db:/var/lib/postgresql/data/"
241240

242241
postgres-dev:
243242
extends:
@@ -249,7 +248,7 @@ services:
249248

250249
psql:
251250
extends: postgres
252-
command: psql -h postgres -U webknossos_user webknossos
251+
command: psql -h postgres -U postgres webknossos
253252
links:
254253
- "postgres-persisted:postgres"
255254
depends_on:
@@ -262,7 +261,7 @@ services:
262261

263262
drop-db:
264263
extends: postgres
265-
command: psql -h postgres -U webknossos_user postgres -c "DROP DATABASE webknossos"
264+
command: psql -h postgres -U postgres postgres -c "DROP DATABASE webknossos"
266265
links:
267266
- "postgres-persisted:postgres"
268267
depends_on:
@@ -284,8 +283,8 @@ services:
284283
extends:
285284
service: fossildb
286285
volumes:
287-
- "./fossildb/data:/fossildb/data"
288-
- "./fossildb/backup:/fossildb/backup"
286+
- "./fossildb-old/data:/fossildb/data"
287+
- "./fossildb-old/backup:/fossildb/backup"
289288

290289
fossildb-dev:
291290
extends:

frontend/javascripts/oxalis/controller/segment_mesh_controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ export default class SegmentMeshController {
167167
} else {
168168
this.meshesLODRootGroup.addLODMesh(targetGroup, lod);
169169
}
170+
console.log("Mesh using scale and offset with lod ", scale, offset, lod);
170171
targetGroup.segmentId = segmentId;
171172
if (scale != null) {
172173
targetGroup.scale.copy(new THREE.Vector3(...scale));

webknossos-datastore/app/com/scalableminds/webknossos/datastore/services/MeshFileService.scala

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,7 @@ class MeshFileService @Inject()(config: DataStoreConfig, dataVaultService: DataV
414414
bytesPerLod.take(lod).sum + chunkByteOffsetsInLod(lod)(currentChunk)
415415

416416
def computeGlobalPositionAndOffset(lod: Int, currentChunk: Int): MeshChunk = {
417-
val globalPosition = segmentInfo.gridOrigin + segmentInfo
418-
.chunkPositions(lod)(currentChunk)
419-
.toVec3Float * segmentInfo.chunkShape * Math.pow(2, lod) * segmentInfo.lodScales(lod) * lodScaleMultiplier
417+
val globalPosition = segmentInfo.chunkPositions(lod)(currentChunk).toVec3Float
420418

421419
MeshChunk(
422420
position = globalPosition, // This position is in Voxel Space
@@ -479,11 +477,26 @@ class MeshFileService @Inject()(config: DataStoreConfig, dataVaultService: DataV
479477
chunkRange <- mesh.getChunkRange(segmentId, minishardIndex)
480478
chunk <- mesh.getChunk(chunkRange, shardUrl)
481479
segmentManifest = NeuroglancerSegmentManifest.fromBytes(chunk)
480+
_ = logger.info(s"Chunk Position 0 ${segmentManifest.chunkPositions(0)}")
482481
meshSegmentInfo = enrichSegmentInfo(segmentManifest, meshInfo.lod_scale_multiplier, chunkRange.start, segmentId)
483-
transform = meshInfo.transform2DArray // Something is going wrong here, the meshes are far outside the other data
484-
//transform = Array(Array(2.0, 0.0, 0.0, 0.0), Array(0.0, 2.0, 0.0, 0.0), Array(0.0, 0.0, 2.0, 0.0))
482+
meshSegmentInfoc = meshSegmentInfo.copy(lods = List(meshSegmentInfo.lods(0)))
483+
scale = segmentManifest.chunkShape * meshInfo.lod_scale_multiplier
484+
_ = logger.info(s"segment info $meshSegmentInfo")
485+
transform = Array(
486+
Array(scale.x * meshInfo.transform(0), 0.0, 0.0, 0.0),
487+
Array(0.0, scale.y * meshInfo.transform(5), 0.0, 0.0),
488+
Array(0.0, 0.0, scale.z * meshInfo.transform(10), 0.0),
489+
Array(0.0, 0.0, 0.0, 1.0)
490+
)
491+
//transform = meshInfo.transform2DArray // Something is going wrong here, the meshes are far outside the other data
492+
//
493+
// This works for precomputed-fafb with ds scale 4,4,40
494+
//transform = Array(Array(2.0, 0.0, 0.0, 0.0),
495+
// Array(0.0, 2.0, 0.0, 0.0),
496+
// Array(0.0, 0.0, 2.5, 0.0),
497+
// Array(0.0, 0.0, 0.0, 1.0))
485498
encoding = "draco"
486-
wkChunkInfos <- WebknossosSegmentInfo.fromMeshInfosAndMetadata(List(meshSegmentInfo), encoding, transform)
499+
wkChunkInfos <- WebknossosSegmentInfo.fromMeshInfosAndMetadata(List(meshSegmentInfoc), encoding, transform)
487500
} yield wkChunkInfos
488501

489502
def readMeshChunk(organizationId: String,

0 commit comments

Comments
 (0)