Skip to content

Commit

Permalink
solve merge conflicts with restruct_mem
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomusy committed Nov 15, 2023
2 parents 5376657 + f6ce190 commit 774ea17
Show file tree
Hide file tree
Showing 318 changed files with 21,485 additions and 15,506 deletions.
42 changes: 0 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,55 +43,13 @@ jobs:
destination: test-reports


##############################################################
test-dolfinx:
docker:
- image: quay.io/fenicsproject/dolfinx:dev-env-real
environment:
MPLBACKEND: "agg"
DEBIAN_FRONTEND: "noninteractive"

steps:
- checkout

- run:
name: install vedo et al
command: |
pip3 install vtk
pip3 install .
- run:
name: Get dolfinx cmake compile and install
command: |
pip3 install git+https://github.com/FEniCS/fiat.git --upgrade
pip3 install git+https://github.com/FEniCS/ufl.git --upgrade
pip3 install git+https://github.com/FEniCS/ffcx.git --upgrade
rm -rf /usr/local/include/dolfin /usr/local/include/dolfin.h
git clone https://github.com/FEniCS/dolfinx.git
cd dolfinx
mkdir -p build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer ../cpp/
ninja -j3 install
cd ../python
pip3 -v install . --user
- run:
name: Run tests
command: |
cd
cd project/tests/dolfinx
source run_all.sh
- store_artifacts:
path: test-reports
destination: test-reports

######################################################
workflows:
version: 2
build-stuff:
jobs:
- test-vedo
#- test-dolfinx



Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.vedo_pipeline_graphviz*

docs/examples_db.js
docs/index.html
docs/pdoc/html

vedo.egg-info
build
Expand All @@ -18,7 +18,7 @@ examples/notebooks/.ipynb_checkpoints
*jpg
*tiff
*tif
*npz
# *npz

untitled*.py
bug_*.py
Expand All @@ -27,3 +27,7 @@ store
speed_tester.py
data
www

dev_*.py
z?.py
v?.py
106 changes: 106 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,108 @@
## Main changes
Major internal refactoring.

## Breaking changes

### Renaming
- rename internal list `plt.actors` which now become `plt.objects`
- rename `.points()` to property `.vertices`. Hence:
`mesh.points() -> mesh.vertices`
`mesh.points(newpoints) -> mesh.vertices = newpoints`
- rename `.cell_centers()` to property `.cell_centers`
- rename `.faces()` to property `.cells`
- rename `.lines()` to property `.lines`
- rename `.edges()` to property `.edges`
- rename `.normals()` and split it into property `.vertex_normals` and property `.cell_normals`
- rename `picture.Picture2D(...)` which becomes `Image(...).clone2d()` (see `examples/pyplot/embed_matplotlib.py`).
- rename `Volume.probe_points()` which becomes `points.probe(volume)`
- rename `Volume.probe_line()` which becomes `line.probe(volume)`
- rename `Volume.probe_plane()` which becomes `plane.probe(volume)`
- rename `file_io.load_transform()`. `LinearTransform("file.mat")` substitutes it.
- rename `transform_with_landmarks()` to `align_with_landmarks()`
- rename `find_cells_in()` to `find_cells_in_bounds()`
- rename `mesh.is_inside(pt)` moved to `mesh.contains(pt)`
- rename `Slicer2DPlotter` moved to `application module.Slicer2DPlotter`
- rename and moved method `voronoi()` to `points.generate_voronoi()`
- rename class `Ruler` to `Ruler3D`

### Other changes
- improvements in how vtk classes are imported (allow lazy import)
- improvements to method `mesh.clone2d()`
- improvements in `Slicer3DPlotter` thanks to @daniel-a-diaz in #925
- improvements in `applications.Browser`

- add new `vedo.transformations.py` module.
- add `plotter.pick_area()` thanks to @ZiguoAtGitHub and @RubendeBruin feedback.
- add texture to npz files thanks to @zhouzq-thu in #918
- add background radial gradients
- add `utils.line_line_distance()` function
- add `utils.segment_segment_distance()` function
- add `plotter.initialize_interactor()` method
- add object hinting by hovering mouse (see `flag_labels1.py`)
- add `colors.lut_color_at(value)` the color of the lookup table at value.
- add `.show(..., screenshot="myfile.png")` keyword
- add `object.coordinates` same as `object.vertices`
- add `move()` to move single points or objects
- add `copy()` as alias to `clone()`
- add "Roll" to camera dictionary (thanks @baba-yaga )
- add `applications.Slicer3DTwinPlotter` thanks to @daniel-a-diaz
- add radii feature to `smooth_mls_2d()` by @jo-mueller (now store results in arrays `mesh.pointdata['MLSVariance']` and `mesh.pointdata['MLSValidPoint']`)
- passing a `vtkCamera` to `show(camera=...)` triggers a copy of the input which is therefore not muted by any subsequent interaction (thanks @baba-yaga )

### Bug Fixes
- bug fix in `closest_point()` thanks to @goncalo-pt
- bug fix in tformat thanks to @JohnsWor in #913
- bug fix in windows OS in timers callbacks thanks to @jonaslindemann
- bug fix to non linear tranforms mode. Now it can be instantiated with a dictionary
- bug fix in meshlab interface thanks to @JeffreyWardman in #924
- bug fix changed `mp = matplotlib.colormaps[name]` in colors.py


## New/Revised Examples
```
examples/basic/buttons.py
examples/basic/input_box.py
examples/basic/sliders2.py
examples/basic/spline_tool.py
examples/basic/interaction_modes2.py
examples/advanced/timer_callback1.py
examples/advanced/timer_callback2.py
examples/advanced/warp4a.py
examples/advanced/warp4b.py
examples/pyplot/embed_matplotlib.py
examples/pyplot/plot_fxy2.py
examples/simulations/springs_fem.py
examples/simulations/lorenz.py
examples/volumetric/numpy2volume0.py
examples/volumetric/slicer1.py
examples/volumetric/tet_astyle.py
examples/volumetric/tet_cut1.py
examples/volumetric/tet_cut2.py
examples/other/flag_labels1.py
```

### Broken Examples
```
tests/issues/discussion_800.py
tests/issues/issue_905.py
gyroscope1.py broken
markpoint.py
examples/other/pygmsh_cut.py ust cut tetmesh to gen ugrid
```

#### Broken Projects
umap_viewer3d
trackviewer (some problems with removing a track)


#### Broken Exports to .npz:
boolean.py
cartoony.py
flatarrow.py
mesh_lut.py
mesh_map2cell.py
texturecubes.py
meshquality.py
volumetric/streamlines1.py


88 changes: 48 additions & 40 deletions docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,47 +37,39 @@ vedo https://vedo.embl.es/examples/data/panther.stl.gz
![](https://vedo.embl.es/images/feats/vedo_cli_panther.png)

Pressing `h` will then show a number of options to interact with your 3D scene:
```
i print info about the last clicked object
I print color of the pixel under the mouse
Y show the pipeline for this object as a graph
<- -> use arrows to reduce/increase opacity
x toggle mesh visibility
w toggle wireframe/surface style
l toggle surface edges visibility
p/P hide surface faces and show only points
1-3 cycle surface color (2=light, 3=dark)
4 cycle color map (press shift-4 to go back)
5-6 cycle point-cell arrays (shift to go back)
7-8 cycle background and gradient color
09+- cycle axes styles (on keypad, or press +/-)
k cycle available lighting styles
K toggle shading as flat or phong
A toggle anti-aliasing
D toggle depth-peeling (for transparencies)
U toggle perspective/parallel projection
o/O toggle extra light to scene and rotate it
a toggle interaction to Actor Mode
n toggle surface normals
r reset camera position
R reset camera to the closest orthogonal view
. fly camera to the last clicked point
C print current camera settings
X invoke a cutter widget tool
S save a screenshot of the current scene
E/F export 3D scene to numpy file or X3D
q return control to python script
Esc abort execution and exit python kernel
```

============================================================
| Press: i print info about selected object |
| I print the RGB color under the mouse |
| y show the pipeline for this object as a graph |
| <--> use arrows to reduce/increase opacity |
| w/s toggle wireframe/surface style |
| p/P change point size of vertices |
| l toggle edges visibility |
| x toggle mesh visibility |
| X invoke a cutter widget tool |
| 1-3 change mesh color |
| 4 use data array as colors, if present |
| 5-6 change background color(s) |
| 09+- (on keypad) or +/- to cycle axes style |
| k cycle available lighting styles |
| K cycle available shading styles |
| A toggle anti-aliasing |
| D toggle depth-peeling (for transparencies) |
| o/O add/remove light to scene and rotate it |
| n show surface mesh normals |
| a toggle interaction to Actor Mode |
| j toggle interaction to Joystick Mode |
| U toggle perspective/parallel projection |
| r reset camera position |
| R reset camera orientation to orthogonal view |
| . fly camera towards last clicked point |
| C print current camera settings |
| S save a screenshot |
| E/F export 3D scene to numpy file or X3D |
| q return control to python script |
| Esc abort execution and exit python kernel |
|------------------------------------------------------------|
| Mouse: Left-click rotate scene / pick actors |
| Middle-click pan scene |
| Right-click zoom scene in or out |
| Cntrl-click rotate scene |
|------------------------------------------------------------|
| Check out the documentation at: https://vedo.embl.es |
============================================================


## Export your 3D scene to file
You can export it to a vedo file, which is actually a normal `numpy` file by pressing `E`
Expand Down Expand Up @@ -292,3 +284,19 @@ for more information, where you can ask questions and report issues.
You are also welcome to post specific questions on the [**image.sc**](https://forum.image.sc/) forum,
or simply browse the [**examples gallery**](https://vedo.embl.es/#gallery).

You can also find online tutorials at:

- [Summer School on Computational Modelling of Multicellular Systems](https://github.com/LauAvinyo/vedo-embo-course) with [slides](https://github.com/LauAvinyo/vedo-embo-course/blob/main/vedo-embo-presentation.pdf) by Laura Avinyo (EMBL).

- Youtube video tutorials:
[Visualizing Multiple 3D Objects in Medical Imaging](https://www.youtube.com/watch?v=LVoj3poN2WI),
[Capture 3D Mesh Screenshots in Medical Imaging](https://www.youtube.com/watch?v=8Qn14WMUamA),
[Slice 'n Dice: Precision 3D Mesh Cutting](https://www.youtube.com/watch?v=dmXC078ZOR4&t=195s),
[3D Visualization of STL Files](https://www.youtube.com/watch?v=llq9-oJXepQ)
by [M. El Amine](https://github.com/amine0110/pycad).

- [Creating an interactive 3D geological model](https://www.youtube.com/watch?v=raiIft8VeRU&t=1s) by A. Pollack.

- ["vedo", a python module for scientific analysis and visualization of 3D data](https://www.youtube.com/watch?v=MhIoetdxwc0&t=39s), I2K Conference, by M. Musy (EMBL).


Loading

0 comments on commit 774ea17

Please sign in to comment.