-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
85 changed files
with
150,879 additions
and
1,858 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
""" | ||
Cut a mesh with another mesh. | ||
Try command line | ||
> vtkplotter data/embryo.tif | ||
to see the threshold range. | ||
Cut a mesh with another mesh | ||
""" | ||
from vtkplotter import * | ||
|
||
embryo = load(datadir+"embryo.tif", threshold=30).normalize() | ||
txt = Text(__doc__, c='w', bg='lb') | ||
|
||
# mesh used to cut: | ||
msh = Ellipsoid().pos(0.8, 0.1, -0.3).scale(0.5).wire() | ||
msh = Ellipsoid().pos(0.8, 0.1, -0.3).scale(0.5).wireframe() | ||
|
||
# make a working copy and cut it with the ellipsoid | ||
cutembryo = embryo.clone().cutWithMesh(msh).backColor("t").phong() | ||
cutembryo = embryo.clone().cutWithMesh(msh).backColor("t") | ||
|
||
show(embryo, msh, Text(__doc__), at=0, N=2, axes=1, viewup="z") | ||
show(cutembryo, at=1, interactive=1) | ||
show(embryo, msh, at=0, N=2, axes=1, viewup="z") | ||
show(cutembryo, txt, at=1, interactive=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.