Skip to content
Snippets Groups Projects
Commit 9f147b7e authored by Xiao Gui's avatar Xiao Gui
Browse files

fix: minimap in axial maximized view

feat: allow labelled nifti to be visualized
parent 64df3d7c
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ data:
SIIBRA_CACHEDIR: /siibra-api-volume
HBP_DISCOVERY_URL: "https://iam.ebrains.eu/auth/realms/hbp"
REDIS_ADDR: "cache-redis-service"
V2_7_PLUGIN_URLS: "https://siibra-jugex.apps.tc.humanbrainproject.eu/viewer_plugin/manifest.json;https://neurogenpy.apps.ebrains.eu/viewer_plugin/manifest.json"
V2_7_PLUGIN_URLS: "https://siibra-jugex.apps.tc.humanbrainproject.eu/viewer_plugin/manifest.json;https://ngpy.apps.hbp.eu/viewer_plugin/manifest.json"
LOGGER_DIR: "/sxplr-log"
OVERWRITE_API_ENDPOINT: https://siibra-api-prod.apps.tc.humanbrainproject.eu/v3_0
OVERWRITE_SPATIAL_ENDPOINT: 'https://siibra-spatial-backend.apps.tc.humanbrainproject.eu'
......
......@@ -46,7 +46,7 @@
"python 3",
"typescript"
],
"schema:releaseNotes": "# v2.14.13\n\n## Feature\n\n- Added an example of setting up a proxy for access-controlled content\n- Added free-mode (access via `?free=true`)\n- Added hint for drag-n-drop nifti file (in helper one pager and quick tour)\n\n## Bugfix\n\n- Fixed layout issues when user drag-n-dropped nifti has irregularities\n\n## Behind the scene\n\n- Added script to automatically create release metadata files\n",
"schema:releaseNotes": "# v2.14.13\n\n## Feature\n\n- Added an example of setting up a proxy for access-controlled content\n- Added free-mode (access via `?free=true`)\n- Added hint for drag-n-drop nifti file (in helper one pager and quick tour)\n- Allow nifti to be added as a labelled volume by using `.label.nii.gz` or `.label.nii` extension\n\n## Bugfix\n\n- Fixed layout issues when user drag-n-dropped nifti has irregularities\n- Fixed picture-in-picture minimap in maximized axial view\n\n## Behind the scene\n\n- Added script to automatically create release metadata files\n",
"runtimePlatform": "docker",
"version": "2.14.13",
"contIntegration": "https://github.com/FZJ-INM1-BDA/siibra-explorer/actions",
......
......@@ -13,4 +13,4 @@
You can enable the touch interface, which is selected per default on mobile devices, by selecting the user menu from the top right (👤), then choosing `Settings` and `Enable Mobile UI`.
You can drag-and-drop NiFTi (`.nii` or `.nii.gz`) file on top of your desired template to co-visualize them.
You can drag-and-drop NiFTi (`[.label].nii[.gz]`) file on top of your desired template to co-visualize them. Files with extension`.label.nii[.gz]` will be visualized as labelled volume.
......@@ -5,10 +5,12 @@
- Added an example of setting up a proxy for access-controlled content
- Added free-mode (access via `?free=true`)
- Added hint for drag-n-drop nifti file (in helper one pager and quick tour)
- Allow nifti to be added as a labelled volume by using `.label.nii.gz` or `.label.nii` extension
## Bugfix
- Fixed layout issues when user drag-n-dropped nifti has irregularities
- Fixed picture-in-picture minimap in maximized axial view
## Behind the scene
......
......@@ -793,9 +793,9 @@ body::after
gap: 0.2rem 0.2rem;
}
.grid > .grid-wide-3
.grid > .grid-wide-4
{
grid-column: 1 / 4;
grid-column: 1 / 5;
}
.v-center-text-span
......
......@@ -13,7 +13,7 @@
<link rel="icon" type="image/png" href="assets/favicons/favicon-128-light.png"/>
<script src="extra_js.js"></script>
<script src="https://unpkg.com/three-surfer@0.0.17/dist/bundle.js" defer></script>
<script type="module" src="https://unpkg.com/ng-layer-tune@0.0.26/dist/ng-layer-tune/ng-layer-tune.esm.js"></script>
<script type="module" src="https://unpkg.com/ng-layer-tune@0.0.28/dist/ng-layer-tune/ng-layer-tune.esm.js"></script>
<script type="module" src="https://unpkg.com/hbp-connectivity-component@0.6.6/dist/connectivity-component/connectivity-component.js" ></script>
<script src="https://cdn.plot.ly/plotly-2.24.1.min.js" charset="utf-8"></script>
<script src="main.bundle.js" charset="utf-8"></script> <!-- export_nehuba -->
......
......@@ -56,7 +56,7 @@ export class NehubaGlueCmp implements IViewer<'nehuba'>, OnDestroy {
private onDestroyCb: (() => void)[] = []
public nehubaConfig: NehubaConfig
public QUICKTOUR_DND_MD = `Drag and drop any \`.nii\` or \`.nii.gz\` on top of the template to co-visualize.`
public QUICKTOUR_DND_MD = `Drag and drop any \`[.label].nii[.gz]\` on top of the template to co-visualize.`
ngOnDestroy(): void {
while (this.onDestroyCb.length) this.onDestroyCb.pop()()
......
......@@ -113,12 +113,15 @@ export class UserLayerService implements OnDestroy {
})
const { buffer, meta } = result
const url = URL.createObjectURL(new Blob([buffer]))
const type = file.name.includes(".label.nii")
? 'segmentation'
: 'image'
return {
protocol: 'nifti://',
url,
option: {
legacySpecFlag: "old",
type: 'image',
type,
shader: getShader({
colormap: EnumColorMapName.MAGMA,
lowThreshold: meta.min || 0,
......
......@@ -38,12 +38,12 @@
</button>
<div *ngIf="view.showMore || view.compact"
class="sxplr-custom-cmp darker-bg overflow-hidden grid-wide-3">
class="sxplr-custom-cmp darker-bg overflow-hidden grid-wide-4">
<ng-template [ngTemplateOutlet]="ngLayerController" [ngTemplateOutletContext]="{ onlyOpacity: !view.showMore }">
</ng-template>
</div>
<ul class="grid-wide-3 sxplr-custom-cmp darker-bg" *ngIf="view.showMore">
<ul class="grid-wide-4 sxplr-custom-cmp darker-bg" *ngIf="view.showMore">
<li *ngFor="let warn of data.warning">{{ warn }}</li>
</ul>
......
......@@ -2,7 +2,7 @@ import { Component, Inject, ViewChild, ChangeDetectionStrategy, inject, HostList
import { FormControl } from "@angular/forms";
import { select, Store } from "@ngrx/store";
import { BehaviorSubject, combineLatest, concat, merge, NEVER, Observable, of, Subject } from "rxjs";
import { switchMap, distinctUntilChanged, map, debounceTime, shareReplay, take, withLatestFrom, filter, takeUntil } from "rxjs/operators";
import { switchMap, distinctUntilChanged, map, debounceTime, shareReplay, take, withLatestFrom, filter, takeUntil, tap } from "rxjs/operators";
import { SxplrTemplate } from "src/atlasComponents/sapi/sxplrTypes"
import { selectedTemplate } from "src/state/atlasSelection/selectors";
import { panelMode, panelOrder } from "src/state/userInterface/selectors";
......@@ -26,10 +26,10 @@ const anatOriToIdx: Record<AnatomicalOrientation, number> = {
'ap': 1,
'si': 2
}
const anaOriAltAxis: Record<AnatomicalOrientation, (tmplSize: [number, number, number], ratio: {x: number, y: number}) => {idx: number, value: number}> = {
'rl': (tmplSize, { y }) => ({ idx: 2, value: tmplSize[2] * (0.5 - y) }),
'ap': (tmplSize, { y }) => ({ idx: 2, value: tmplSize[2] * (0.5 - y) }),
'si': (tmplSize, { x }) => ({ idx: 2, value: tmplSize[0] * (0.5 - x) })
const anaOriAltAxis: Record<AnatomicalOrientation, (templateInfo: TemplateInfo, ratio: {x: number, y: number}) => {idx: number, value: number}> = {
'rl': (templateInfo, { y }) => ({ idx: 2, value: templateInfo.real[0] * (0.5 - y) }),
'ap': (templateInfo, { y }) => ({ idx: 2, value: templateInfo.real[1] * (0.5 - y) }),
'si': (templateInfo, { y }) => ({ idx: 0, value: templateInfo.real[2] * (y - 0.5) })
}
function getDim(triplet: number[], view: EnumClassicalView) {
......@@ -424,7 +424,7 @@ export class PerspectiveViewSlider {
}
if (!isNullish(xyRatio.x) && !isNullish(xyRatio.y)) {
const { idx, value } = anaOriAltAxis[anatomicalOrientation](currTmplSize.real, xyRatio)
const { idx, value } = anaOriAltAxis[anatomicalOrientation](currTmplSize, xyRatio)
positionMod.push({
idx,
value
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment