Skip to content

Commit

Permalink
Merge pull request #1467 from FZJ-INM1-BDA/staging
Browse files Browse the repository at this point in the history
v2.14.6
  • Loading branch information
xgui3783 authored Jul 22, 2024
2 parents 8421d26 + f9a9fc0 commit 6ebb7cc
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ jobs:
- setting-vars
uses: ./.github/workflows/deploy-helm.yml
with:
DEPLOYMENT_NAME: master
DEPLOYMENT_NAME: prod
IMAGE_TAG: ${{ needs.setting-vars.outputs.SXPLR_VERSION }}
IMAGE_DIGEST: ${{ needs.build-docker-img.outputs.GIT_DIGEST }}
secrets:
Expand Down
10 changes: 10 additions & 0 deletions docs/releases/v2.14.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# v2.14.6

## Feature

- (experimental) support `.pointcloud` drag-and-drop

## Bugfix

- Fixed dependency support for new GCS JSON API

1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ nav:
- Differential gene expression analysis: "advanced/differential_gene_expression_analysis.md"

- Release notes:
- v2.14.6: 'releases/v2.14.6.md'
- v2.14.5: 'releases/v2.14.5.md'
- v2.14.4: 'releases/v2.14.4.md'
- v2.14.3: 'releases/v2.14.3.md'
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siibra-explorer",
"version": "2.14.5",
"version": "2.14.6",
"description": "siibra-explorer - explore brain atlases. Based on humanbrainproject/nehuba & google/neuroglancer. Built with angular",
"scripts": {
"lint": "eslint src --ext .ts",
Expand Down Expand Up @@ -55,7 +55,7 @@
"@ngrx/effects": "^15.4.0",
"@ngrx/store": "^15.4.0",
"acorn": "^8.4.1",
"export-nehuba": "^0.1.5",
"export-nehuba": "^0.1.8",
"file-loader": "^6.2.0",
"jszip": "^3.6.0",
"postcss": "^8.3.6",
Expand Down
27 changes: 25 additions & 2 deletions src/atlasComponents/sapi/core/space/interspaceLinearXform.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const VALID_XFORM_SRC = ["CCF_V2_5", "QUICKNII_ABA"] as const
const VALID_XFORM_SRC = ["CCF_V2_5", "QUICKNII_ABA", "MNI152", "CYRIL_PTCLD"] as const
const VALID_XFORM_DST = ["NEHUBA"] as const

export type TVALID_LINEAR_XFORM_SRC = typeof VALID_XFORM_SRC[number]
Expand All @@ -12,6 +12,29 @@ const _linearXformDict: Record<
TVALID_LINEAR_XFORM_DST,
TLinearXform
>> = {
CYRIL_PTCLD: {
NEHUBA:
// [
// [-0.2, 0.0, 0.0, 96400000.0],
// [0.0, -0.2, 0.0, 96400000.0],
// [0.0, 0.0, -0.2, 114400000.0],
// [0.0, 0.0, 0.0, 1.0]
// ]
[
[-1,0,0,96_500_000],
[0,-1,0,229_000_000 - 132_500_000],
[0,0,-1,193_000_000 - 78_500_000],
[0,0,0,1]
]
},
MNI152: {
NEHUBA: [
[1,0,0,-96_500_000],
[0,1,0,-132_500_000],
[0,0,1,-78_500_000],
[0,0,0,1]
]
},
CCF_V2_5: {
NEHUBA: [
[-1e3, 0, 0, 11400000 - 5737500], //
Expand All @@ -31,7 +54,7 @@ const _linearXformDict: Record<
}
}

const defaultXform = [
export const defaultXform = [
[1e3, 0, 0, 0],
[0, 1e3, 0, 0],
[0, 0, 1e3, 0],
Expand Down
2 changes: 1 addition & 1 deletion src/features/feature-view/feature-view.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, Inject, Input, inject } from '@angular/core';
import { BehaviorSubject, EMPTY, Observable, combineLatest, concat, of } from 'rxjs';
import { BehaviorSubject, Observable, combineLatest, concat, of } from 'rxjs';
import { catchError, debounceTime, distinctUntilChanged, filter, map, shareReplay, switchMap, takeUntil, withLatestFrom } from 'rxjs/operators';
import { SAPI } from 'src/atlasComponents/sapi/sapi.service';
import { Feature, SimpleCompoundFeature, VoiFeature } from 'src/atlasComponents/sapi/sxplrTypes';
Expand Down
29 changes: 29 additions & 0 deletions src/viewerModule/nehuba/userLayers/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,35 @@ export class UserLayerService implements OnDestroy {
}
}

@RegisterSource(async input => {
if (input instanceof File && input.name.endsWith(".pointcloud")) {
return true
}
return false
})
async processPtCld(file: File): Promise<ProcessorOutput>{

const text = await file.text()

const id = getUuid()
const xform = await linearTransform("CYRIL_PTCLD", "NEHUBA")
const layer = new AnnotationLayer(id, "#ff0000", xform)

layer.addAnnotation(text.split("\n").map((line, idx) => ({
id: `${id}-${idx}`,
type: "point",
point: line.split(" ").map(v => parseFloat(v)*1e6) as [number, number, number],
})))
return {
cleanup: () => {
layer.dispose()
},
meta: {
filename: file.name,
}
}
}

async #processInput(input: ValidInputTypes): Promise<ProcessorOutput> {
for (const { matcher, processor } of SOURCE_PROCESSOR) {
if (await matcher(input)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,6 @@ export class ThreeSurferGlueCmp implements IViewer<'threeSurfer'>, AfterViewInit

const {
geometry: evGeometry,
verticesIndicies: evVerticesIndicies,
vertexIndex
} = detail.mesh as { geometry: TThreeGeometry, verticesIndicies: number[], vertexIndex: number }

Expand Down

0 comments on commit 6ebb7cc

Please sign in to comment.