Skip to content
Open
Changes from 5 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
813d5d4
Updated some core dev info
Garyfallidis May 12, 2018
ae41159
Added a few more names
Garyfallidis May 12, 2018
3ecfa3a
Merge pull request #1517 from Garyfallidis/dev_info_update
skoudoro May 12, 2018
1af53ac
DOC: updated some developers affiliations.
jchoude May 14, 2018
f4c7e45
Merge pull request #1518 from jchoude/DOC_some_developers_affiliations
skoudoro May 14, 2018
144cadb
Updating the documentation for the workflow creation tutorial.
May 14, 2018
c5729fc
Removed the trailing whitespaces as per the PEP8 standard.
May 14, 2018
b421f9c
Moved some older highlights and announcements to the old news files.
arokem May 14, 2018
05d4691
Now also remove things from the front page.
arokem May 14, 2018
34937d4
Updated the workflow_creation.py according to the recommendations mad…
May 16, 2018
b7f94ae
Added back two more news announcements.
arokem May 16, 2018
b5001ba
TST: We should be able to read values with Streamline objects.
arokem May 16, 2018
a710850
BF: Enables extracting values with Streamline objects.
arokem May 16, 2018
202028d
PEP8
arokem May 16, 2018
5648281
Merge pull request #1521 from arokem/old_highlights
skoudoro May 16, 2018
23cb625
PEP8 the entire thing.
arokem May 16, 2018
8462d3e
Merge pull request #1524 from arokem/values_from_streamlines_object
skoudoro May 16, 2018
6bee25c
Merge pull request #1520 from parichit/doc_branch
skoudoro May 17, 2018
04bbca4
iniital changes
thechargedneutron May 18, 2018
2571445
extra env files deleted
thechargedneutron May 18, 2018
2fbe4b1
minor typo fix in quickstart
ShreyasFadnavis May 21, 2018
f7b0e61
input parametrs changed
thechargedneutron May 21, 2018
6dda3ac
Merge pull request #1529 from ShreyasFadnavis/micro
arokem May 21, 2018
786deb6
Wrong default value for parameter 'symmetric' False in connectivity_m…
albayenes May 21, 2018
0bdce0d
Merge pull request #1530 from albayenes/connectivity-matrix-wrong-def…
arokem May 21, 2018
cfc96f9
removed unncessary importd from sims eg
ShreyasFadnavis May 27, 2018
1263199
doc changed
thechargedneutron May 27, 2018
5ff2e7f
unnecessary venv files removed
thechargedneutron May 27, 2018
8410945
Explanation that is mistakenly rendered as code fixed in example of DKI
albayenes May 28, 2018
804f4e8
Merge pull request #1537 from ShreyasFadnavis/dipy-sims
Garyfallidis May 28, 2018
54823e7
Remove unused attributes in UI and add better way of handling absolut…
MarcCote Mar 4, 2018
50acf99
Remove FileMenu2D in favor of ListBox2D.
MarcCote Mar 4, 2018
5e061da
BF: button placement in viz_ui.py.
MarcCote Mar 6, 2018
ee6eee3
Rebased + update viz examples
MarcCote Apr 5, 2018
8d29466
Add Disk2D and use it as sliders' handle
MarcCote Apr 7, 2018
f370c80
Do not start session in viz example
MarcCote Apr 10, 2018
98b6565
Addressed @skoudoro comments
MarcCote Apr 20, 2018
bbd9808
Renamed DiskSlider2D to RingSlider2D
MarcCote May 17, 2018
afab328
Refactor get_actors
MarcCote May 29, 2018
c17a642
Rename DiskSlider to RingSlider
MarcCote May 29, 2018
c67a2df
Removed debugging BoundingBox
MarcCote May 29, 2018
866e26c
Remove empty line at the end of dosctring
MarcCote May 29, 2018
3c4eaf0
PEP8
MarcCote May 29, 2018
f1991f0
change for cvxpy - missing strict inequalities
Borda May 30, 2018
8110b02
update test asserts: equal -> almost_equal
Borda May 30, 2018
d1bdee5
DOC: Update Rafael's current institution.
May 26, 2018
ba39896
Merge pull request #1536 from jhlegarreta/UpdateRNHCurrentInstitution
arokem May 31, 2018
acda6e1
Merge pull request #1538 from albayenes/fix-explanation-of-code-in-ex…
arokem Jun 1, 2018
6fdbb63
Add tests files
MarcCote Jun 1, 2018
d8fb000
Merge pull request #1492 from MarcCote/enh_ui_components_positioning2
Garyfallidis Jun 1, 2018
7aeb622
Added DIPY reference in README.rst
Garyfallidis Jun 3, 2018
2c48473
Link the reference
Garyfallidis Jun 3, 2018
f95d1e6
Merge pull request #1545 from Garyfallidis/readme_ref
arokem Jun 3, 2018
df6d880
References to reference
Garyfallidis Jun 3, 2018
e1422d7
Merge pull request #1546 from Garyfallidis/readme_ref2
arokem Jun 4, 2018
1db31a9
Fixed references per request of @garyfallidis.
kesshijordan Jun 4, 2018
2475685
Merge pull request #1542 from Borda/fix_4_cvxpy
skoudoro Jun 5, 2018
fa7b35e
fix potential zero division in demon regist.
Borda May 30, 2018
88e132a
Merge pull request #1548 from kesshijordan/fix_boot_reference
Garyfallidis Jun 5, 2018
4484514
Merge pull request #1540 from Borda/fix_div_zero
skoudoro Jun 5, 2018
0e3c38f
Merge branch 'master' of https://github.com/nipy/dipy into cancer_sph…
thechargedneutron Jun 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions dipy/viz/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from dipy.viz.utils import lines_to_vtk_polydata
from dipy.viz.utils import set_input
from dipy.viz.utils import numpy_to_vtk_points, numpy_to_vtk_colors
import dipy.viz.utils as ut_vtk

# Conditional import machinery for vtk
from dipy.utils.optpkg import optional_package
Expand Down Expand Up @@ -1339,7 +1340,7 @@ def point(points, colors, opacity=1., point_radius=0.1, theta=8, phi=8):
return actor


def sphere(centers, colors, radii=1., theta=16, phi=16):
def sphere(centers, colors, radii=1., theta=16, phi=16, vertices=None, faces=None):
""" Visualize one or many spheres with different colors and radii

Parameters
Expand All @@ -1350,6 +1351,8 @@ def sphere(centers, colors, radii=1., theta=16, phi=16):
radii : float or ndarray, shape (N,)
theta : int
phi : int
vertices : vertices array
faces : faces array

Returns
-------
Expand Down Expand Up @@ -1378,16 +1381,22 @@ def sphere(centers, colors, radii=1., theta=16, phi=16):
radii_fa = numpy_support.numpy_to_vtk(radii.astype('f8'), deep=0)
radii_fa.SetName('rad')

src = vtk.vtkSphereSource()
src.SetRadius(0.5)
src.SetThetaResolution(theta)
src.SetPhiResolution(phi)

polyData = vtk.vtkPolyData()
polyData.SetPoints(pts)
polyData.GetPointData().AddArray(radii_fa)
polyData.GetPointData().SetActiveScalars('rad')
polyData.GetPointData().AddArray(cols)
if faces is None:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @thechargedneutron you will need to rebase this on top of dipy#1528 (my many_spheres branch) and update the test too.

src = vtk.vtkSphereSource()
src.SetRadius(0.5)
src.SetThetaResolution(theta)
src.SetPhiResolution(phi)

polyData.SetPoints(pts)
polyData.GetPointData().AddArray(radii_fa)
polyData.GetPointData().SetActiveScalars('rad')
polyData.GetPointData().AddArray(cols)

else:
for object_ in range(len(sphere_obj)):
ut_vtk.set_polydata_vertices(polyData, vertices)
ut_vtk.set_polydata_triangles(polyData, faces)

glyph = vtk.vtkGlyph3D()
glyph.SetSourceConnection(src.GetOutputPort())
Expand Down