Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
name: mne
channels:
- defaults
- clinicalgraphics # Needed for VTK
dependencies:
- python=3.6.1
- python>=3.6
- pip
- mkl
- numpy
- scipy
- matplotlib
- pyqt=5
- vtk>=7
- nose
- coverage
- pytest
- pytest-cov
- flake8
- pygments
- pip:
- vtk
- "git+https://github.com/enthought/traits.git@a7a83182048c08923953e302658b51b68c802132"
- "git+https://github.com/enthought/pyface.git@13a064de48adda3c880350545717d8cf8929afad"
- "git+https://github.com/enthought/traitsui.git@ee8ef0a34dfc1db18a8e2c0301cc18d96b7a3e2f"
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
brain.add_label("BA1_exvivo", color="blue", scalar_thresh=.5)

# Or you can give a path to a label in an arbitrary location
subj_dir = os.environ["SUBJECTS_DIR"]
subj_dir = brain.subjects_dir
label_file = os.path.join(subj_dir, subject_id,
"label", "%s.MT_exvivo.label" % hemi)
brain.add_label(label_file)
Expand Down
6 changes: 5 additions & 1 deletion surfer/tests/test_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ def test_image():
brain.close()

brain = Brain(*std_args, size=100)
if sys.platform == 'darwin' and os.getenv('TRAVIS', '') == 'true':
raise SkipTest('image saving on OSX travis is not supported')
brain.save_image(tmp_name)
brain.save_image(tmp_name, 'rgba', True)
brain.screenshot()
if not os.getenv('TRAVIS', 'false') == 'true':
if os.getenv('TRAVIS', '') != 'true':
# for some reason these fail on Travis sometimes
brain.save_montage(tmp_name, ['l', 'v', 'm'], orientation='v')
brain.save_montage(tmp_name, ['l', 'v', 'm'], orientation='h')
Expand Down Expand Up @@ -340,6 +342,8 @@ def test_movie():
smoothing_steps=10, time=time, time_label='time=%0.2f ms')
brain.scale_data_colormap(fmin=13, fmid=18, fmax=22, transparent=True)

if sys.platform == 'darwin' and os.getenv('TRAVIS', '') == 'true':
raise SkipTest('movie saving on OSX Travis is not supported')
# save movies with different options
tempdir = mkdtemp()
try:
Expand Down
5 changes: 4 additions & 1 deletion surfer/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -3257,7 +3257,10 @@ def add_label(self, label, label_name, color, alpha):
color = colorConverter.to_rgba(color, alpha)
cmap = np.array([(0, 0, 0, 0,), color])
l_m = surf.module_manager.scalar_lut_manager
l_m.load_lut_from_list(cmap)
# for some reason (traits?) using `load_lut_from_list` here does
# not work (.data_range needs to be tweaked in this case),
# but setting the table directly does:
l_m.lut.table = np.round(cmap * 255).astype(np.uint8)
return array_id, surf

def add_morphometry(self, morph_data, colormap, measure,
Expand Down