Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fossils
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Boman Romain
fossils
Commits
be6fcbcc
Commit
be6fcbcc
authored
3 years ago
by
Boman Romain
Browse files
Options
Downloads
Patches
Plain Diff
change lookup table
parent
b536cc34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/boneload.py
+15
-2
15 additions, 2 deletions
models/boneload.py
with
15 additions
and
2 deletions
models/boneload.py
+
15
−
2
View file @
be6fcbcc
...
...
@@ -883,7 +883,6 @@ class SurfMesh:
self
.
polydata
=
None
self
.
mapper
=
None
self
.
actor
=
None
self
.
grid_actor
=
None
self
.
__build
(
nodes
,
tris
,
vertices
)
def
__build
(
self
,
nodes
,
tris
,
vertices
):
...
...
@@ -980,9 +979,21 @@ class Arrows:
mapper
.
SetInputConnection
(
glyph
.
GetOutputPort
())
mapper
.
ScalarVisibilityOn
()
lut
=
vtk
.
vtkLookupTable
()
cs
=
vtk
.
vtkColorSeries
()
# cs.SetColorScheme(cs.BREWER_DIVERGING_BROWN_BLUE_GREEN_9)
cs
.
SetColorScheme
(
cs
.
BREWER_DIVERGING_SPECTRAL_3
)
cs
.
BuildLookupTable
(
lut
,
vtk
.
vtkColorSeries
.
ORDINAL
)
# lut = vtk.vtkLookupTable()
# lut.SetHueRange(0.667,0.)
mapper
.
SetLookupTable
(
lut
)
vmin
,
vmax
=
polydata
.
GetPointData
().
GetVectors
().
GetRange
(
-
1
)
# -1=norm
mapper
.
SetScalarRange
(
vmin
,
vmax
)
actor
=
vtk
.
vtkActor
()
actor
.
SetMapper
(
mapper
)
...
...
@@ -997,7 +1008,8 @@ class Arrows:
class
View
:
def
__init__
(
self
):
self
.
ren
=
vtk
.
vtkRenderer
()
self
.
ren
.
SetBackground
(
colors
.
GetColor3d
(
'
cobalt
'
))
# self.ren.SetBackground(colors.GetColor3d('cobalt'))
self
.
ren
.
SetBackground
(
colors
.
GetColor3d
(
'
white
'
))
self
.
win
=
vtk
.
vtkRenderWindow
()
self
.
win
.
SetSize
(
800
,
800
)
...
...
@@ -1038,6 +1050,7 @@ class ParaviewAxes:
axes
.
SetTotalLength
(
1
,
1
,
1
)
tprop
=
vtk
.
vtkTextProperty
()
tprop
.
ItalicOn
()
tprop
.
SetColor
(
colors
.
GetColor3d
(
'
black
'
))
# for a white background
# tprop.ShadowOn()
# tprop.SetFontFamilyToTimes()
axes
.
GetXAxisCaptionActor2D
().
SetCaptionTextProperty
(
tprop
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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