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
8c65e49e
Commit
8c65e49e
authored
3 years ago
by
Xiao Gui
Browse files
Options
Downloads
Patches
Plain Diff
chore: fix rodent zoom
parent
b1b9160d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/util/pureConstant.service.ts
+37
-8
37 additions, 8 deletions
src/util/pureConstant.service.ts
with
37 additions
and
8 deletions
src/util/pureConstant.service.ts
+
37
−
8
View file @
8c65e49e
...
...
@@ -37,7 +37,33 @@ type TIAVAtlas = {
}
&
THasId
)[]
}
&
THasId
function
getNehubaConfig
(
darkTheme
:
boolean
)
{
const
spaceMiscInfoMap
=
new
Map
([
[
'
minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588
'
,
{
name
:
'
bigbrain
'
,
scale
:
1
,
}],
[
'
minds/core/referencespace/v1.0.0/dafcffc5-4826-4bf1-8ff6-46b8a31ff8e2
'
,
{
name
:
'
icbm2009c
'
,
scale
:
1
,
}],
[
'
minds/core/referencespace/v1.0.0/7f39f7be-445b-47c0-9791-e971c0b6d992
'
,
{
name
:
'
colin27
'
,
scale
:
1
,
}],
[
'
minds/core/referencespace/v1.0.0/265d32a0-3d84-40a5-926f-bf89f68212b9
'
,
{
name
:
'
allen-mouse
'
,
scale
:
0.1
,
}],
[
'
minds/core/referencespace/v1.0.0/d5717c4a-0fa1-46e6-918c-b8003069ade8
'
,
{
name
:
'
waxholm
'
,
scale
:
0.1
,
}],
])
function
getNehubaConfig
(
space
:
TSpaceFull
)
{
const
darkTheme
=
space
.
src_volume_type
===
'
mri
'
const
{
scale
}
=
spaceMiscInfoMap
.
get
(
space
.
id
)
||
{
scale
:
1
}
const
backgrd
=
darkTheme
?
[
0
,
0
,
0
,
1
]
:
[
1
,
1
,
1
,
1
]
...
...
@@ -49,8 +75,8 @@ function getNehubaConfig(darkTheme: boolean) {
?
{
"
color
"
:[
0.5
,
0.5
,
1
,
0.2
]}
:
{
"
color
"
:[
0
,
0
,
0.5
,
0.15
]}
const
drawZoomLevels
=
darkTheme
?
{
"
cutOff
"
:
150000
}
:
{
"
cutOff
"
:
200000
,
"
color
"
:[
0.5
,
0
,
0
,
0.15
]
}
?
{
"
cutOff
"
:
150000
*
scale
}
:
{
"
cutOff
"
:
200000
*
scale
,
"
color
"
:[
0.5
,
0
,
0
,
0.15
]
}
return
{
"
configName
"
:
""
,
...
...
@@ -76,13 +102,16 @@ function getNehubaConfig(darkTheme: boolean) {
"
initialNgState
"
:
{
"
showDefaultAnnotations
"
:
false
,
"
layers
"
:
{},
"
navigation
"
:
{
"
zoomFactor
"
:
350000
*
scale
,
},
"
perspectiveOrientation
"
:
[
0.3140767216682434
,
-
0.7418519854545593
,
0.4988985061645508
,
-
0.3195493221282959
],
"
perspectiveZoom
"
:
1922235.5293810747
"
perspectiveZoom
"
:
1922235.5293810747
*
scale
}
},
"
layout
"
:
{
...
...
@@ -93,7 +122,7 @@ function getNehubaConfig(darkTheme: boolean) {
"
fixedZoomPerspectiveSlices
"
:
{
"
sliceViewportWidth
"
:
300
,
"
sliceViewportHeight
"
:
300
,
"
sliceZoom
"
:
563818.3562426177
,
"
sliceZoom
"
:
563818.3562426177
*
scale
,
"
sliceViewportSizeMultiplier
"
:
2
},
"
mesh
"
:
{
...
...
@@ -105,8 +134,8 @@ function getNehubaConfig(darkTheme: boolean) {
"
drawSubstrates
"
:
drawSubstrates
,
"
drawZoomLevels
"
:
drawZoomLevels
,
"
restrictZoomLevel
"
:
{
"
minZoom
"
:
1200000
,
"
maxZoom
"
:
3500000
"
minZoom
"
:
1200000
*
scale
,
"
maxZoom
"
:
3500000
*
scale
}
}
}
...
...
@@ -556,7 +585,7 @@ Raise/track issues at github repo: <a target = "_blank" href = "${this.repoUrl}"
}
}
const
darkTheme
=
tmpl
.
src_volume_type
===
'
mri
'
const
nehubaConfig
=
getNehubaConfig
(
darkTheme
)
const
nehubaConfig
=
getNehubaConfig
(
tmpl
)
const
initialLayers
=
nehubaConfig
.
dataset
.
initialNgState
.
layers
const
tmplNgId
=
tmpl
.
name
...
...
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