Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siibra-explorer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiao Gui
siibra-explorer
Commits
4a237aea
Commit
4a237aea
authored
3 years ago
by
Xiao Gui
Browse files
Options
Downloads
Patches
Plain Diff
feat: prepare for mebrains multiple template images
parent
b82fe282
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/util/interfaces.ts
+8
-1
8 additions, 1 deletion
src/util/interfaces.ts
src/util/pureConstant.service.ts
+22
-6
22 additions, 6 deletions
src/util/pureConstant.service.ts
with
30 additions
and
7 deletions
src/util/interfaces.ts
+
8
−
1
View file @
4a237aea
...
...
@@ -21,4 +21,11 @@ export const OVERWRITE_SHOW_DATASET_DIALOG_TOKEN = new InjectionToken<TOverwrite
export
type
TRegionOfInterest
=
{
[
'
fullId
'
]:
string
}
export
const
REGION_OF_INTEREST
=
new
InjectionToken
<
Observable
<
TRegionOfInterest
>>
(
'
RegionOfInterest
'
)
export
const
CANCELLABLE_DIALOG
=
new
InjectionToken
(
'
CANCELLABLE_DIALOG
'
)
\ No newline at end of file
export
const
CANCELLABLE_DIALOG
=
new
InjectionToken
(
'
CANCELLABLE_DIALOG
'
)
export
type
TTemplateImage
=
{
name
:
string
'
@id
'
:
string
ngId
:
string
visible
:
boolean
}
This diff is collapsed.
Click to expand it.
src/util/pureConstant.service.ts
+
22
−
6
View file @
4a237aea
...
...
@@ -14,6 +14,7 @@ import { MultiDimMap, recursiveMutate, mutateDeepMerge } from "./fn";
import
{
patchRegions
}
from
'
./patchPureConstants
'
import
{
environment
}
from
"
src/environments/environment
"
;
import
{
MatSnackBar
}
from
"
@angular/material/snack-bar
"
;
import
{
TTemplateImage
}
from
"
./interfaces
"
;
export
const
SIIBRA_API_VERSION_HEADER_KEY
=
'
x-siibra-api-version
'
export
const
SIIBRA_API_VERSION
=
'
0.1.5
'
...
...
@@ -744,16 +745,30 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}"
const
nehubaConfig
=
getNehubaConfig
(
tmpl
)
const
initialLayers
=
nehubaConfig
.
dataset
.
initialNgState
.
layers
const
tmplNgId
=
tmpl
.
name
const
tmplAuxMesh
=
`
${
tmpl
.
name
}
auxmesh`
const
precomputed
=
tmpl
.
_dataset_specs
.
find
(
src
=>
src
[
"
@type
"
]
===
'
fzj/tmp/volume_type/v0.0.1
'
&&
src
.
volume_type
===
'
neuroglancer/precomputed
'
)
as
TVolumeSrc
<
'
neuroglancer/precomputed
'
>
if
(
precomputed
)
{
initialLayers
[
tmplNgId
]
=
{
const
precomputedArr
=
tmpl
.
_dataset_specs
.
filter
(
src
=>
src
[
'
@type
'
]
===
'
fzj/tmp/volume_type/v0.0.1
'
&&
src
.
volume_type
===
'
neuroglancer/precomputed
'
)
as
TVolumeSrc
<
'
neuroglancer/precomputed
'
>
[]
let
visible
=
true
let
tmplNgId
:
string
let
templateImages
:
TTemplateImage
[]
=
[]
for
(
const
precomputedItem
of
precomputedArr
)
{
const
ngIdKey
=
MultiDimMap
.
GetKey
(
precomputedItem
[
"
@id
"
])
initialLayers
[
ngIdKey
]
=
{
type
:
"
image
"
,
source
:
`precomputed://
${
precomputed
.
url
}
`
,
transform
:
precomputed
.
detail
[
'
neuroglancer/precomputed
'
].
transform
source
:
`precomputed://
${
precomputedItem
.
url
}
`
,
transform
:
precomputedItem
.
detail
[
'
neuroglancer/precomputed
'
].
transform
,
visible
}
templateImages
.
push
({
"
@id
"
:
precomputedItem
[
'
@id
'
],
name
:
precomputedItem
.
name
,
ngId
:
ngIdKey
,
visible
})
if
(
visible
)
{
tmplNgId
=
ngIdKey
}
visible
=
false
}
// TODO
...
...
@@ -791,6 +806,7 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}"
useTheme
:
darkTheme
?
'
dark
'
:
'
light
'
,
ngId
:
tmplNgId
,
nehubaConfig
,
templateImages
,
auxMeshes
,
/**
* only populate the parcelltions made available
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment