Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizon updates b1 #1965

Merged
merged 61 commits into from Dec 16, 2019
Merged

Horizon updates b1 #1965

merged 61 commits into from Dec 16, 2019

Conversation

Garyfallidis
Copy link
Contributor

Testing mesa and xvfb issues

@pep8speaks
Copy link

pep8speaks commented Sep 3, 2019

Hello @Garyfallidis, Thank you for updating !

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated at 2019-12-06 22:46:49 UTC

@Garyfallidis Garyfallidis changed the title WIP: Horizon updates b1 Horizon updates b1 Sep 6, 2019
Copy link
Member

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

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

Hi @Garyfallidis, Thank you for this! here my first feedback.

I still have to play with Horizon and I have some questions. But I need to play more with Horizon before asking. Can you fix some pep8 about line length too?

Thank you

dipy/viz/app.py Outdated
@@ -4,15 +4,15 @@
from dipy.io.stateful_tractogram import Space, StatefulTractogram
Copy link
Member

Choose a reason for hiding this comment

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

pep8: not used, you can remove it

dipy/viz/app.py Outdated
@@ -4,15 +4,15 @@
from dipy.io.stateful_tractogram import Space, StatefulTractogram
from dipy.io.streamline import save_tractogram
Copy link
Member

Choose a reason for hiding this comment

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

pep8: not used, you can remove it

dipy/viz/app.py Outdated
@@ -138,90 +139,29 @@ def __init__(self, tractograms=None, images=None, pams=None,
self.tractogram_clusters = {}
self.recorded_events = recorded_events
self.show_m = None
# self.mem = GlobalHorizon()
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove this comment, it appears below

@@ -108,6 +108,7 @@ def __init__(self, tractograms=None, images=None, pams=None,
out_png : string
recorded_events : string
File path to replay recorded events
return_showm : bool
Copy link
Member

Choose a reason for hiding this comment

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

Can you improve documentation here, a lot of options, we need informations

dipy/viz/app.py Outdated

def add_actors(self, scene, tractograms, threshold):
def add_actors(self, scene, tractograms, threshold, callbacks=True):
Copy link
Member

Choose a reason for hiding this comment

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

  • Can you document arguments of this function?
  • Same comment as above: update function name: add_streamlines_actors \ add_bundle_actor \ ...

dipy/viz/gmem.py Outdated
@@ -31,9 +33,11 @@ def __init__(self):

# tractogram level sharing
self.cluster_thr = 15
# self.cluster_lengths = [] # not used
Copy link
Member

Choose a reason for hiding this comment

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

needs 2 spaces between [] and #

dipy/viz/gmem.py Outdated
@@ -31,9 +33,11 @@ def __init__(self):

# tractogram level sharing
self.cluster_thr = 15
# self.cluster_lengths = [] # not used
# self.cluster_sizes = [] # not used
Copy link
Member

Choose a reason for hiding this comment

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

needs 2 spaces between [] and #

dipy/viz/gmem.py Outdated
@@ -31,9 +33,11 @@ def __init__(self):

# tractogram level sharing
self.cluster_thr = 15
# self.cluster_lengths = [] # not used
# self.cluster_sizes = [] # not used
# self.cluster_thr_min_max = [] # not used
Copy link
Member

Choose a reason for hiding this comment

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

needs 2 spaces between [] and #

affine = np.diag([2., 1, 1, 1]).astype('f8')
data = 255 * np.random.rand(150, 150, 150)
images = [(data, affine)]
# images = None
Copy link
Member

Choose a reason for hiding this comment

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

comment to remove

recorded_events=fname)
# npt.assert_equal(os.path.exists('tmp.trk'), True)
# npt.assert_equal(os.stat('tmp.trk').st_size > 0, True)
# os.remove('tmp.trk')
Copy link
Member

Choose a reason for hiding this comment

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

comments to remove or uncomment

@skoudoro skoudoro added this to the 1.1 milestone Sep 24, 2019
Copy link
Member

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

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

Thanks for this @Garyfallidis. it will be good if you could add more documentation in general. Many parameters on the command line are not documented. Otherwise, Can you fix the pep8 from codacy?
You can find my first comments below. Review still in progress...

options = [r'un\hide centroids', 'invert selection',
r'un\select all', 'expand clusters',
'collapse clusters', 'save streamlines',
'recluster']
Copy link
Member

Choose a reason for hiding this comment

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

'recluster' option is not visible on the panel. Is it voluntary?

VisibilityOn()
c.VisibilityOff()
self.cea[c]['expanded'] = 1
if key == 'r' or key == 'R':
Copy link
Member

Choose a reason for hiding this comment

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

reset() unhide hidden clusters? it will be good to collapse only the visible cluster

@skoudoro
Copy link
Member

skoudoro commented Dec 2, 2019

dipy_horizon --cluster --cluster_thr 20 --random_colors C:/Users/skoudoro/.dipy/bundle_atlas_hcp842/Atlas_80_Bundles/whole_brain/whole_brain_MNI.trk give me only 1 colormap as you see below. I think the random_colors as a issue or it is normal ?

image

@skoudoro
Copy link
Member

skoudoro commented Dec 9, 2019

This PR looks good to me.

If there is no other comment until wednesday I will go ahead and merge it.

@arokem
Copy link
Contributor

arokem commented Dec 9, 2019

@skoudoro : I see that there are still a couple of comments you made that are not addressed.

@skoudoro
Copy link
Member

skoudoro commented Dec 9, 2019

Indeed, but I believe now that they deserve a new, smallest and focus PR.
@Garyfallidis will have to create a bunch of small PR. Maybe I should create an issue for it

@skoudoro
Copy link
Member

thank you @Garyfallidis! merging and waiting for new PR

@skoudoro skoudoro merged commit 32f22b5 into dipy:master Dec 16, 2019
@skoudoro skoudoro mentioned this pull request Dec 31, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants