fsleyes issueshttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues2021-09-14T11:44:03+01:00https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/198Persistent error when closing floating control window2021-09-14T11:44:03+01:00Paul McCarthyPersistent error when closing floating control windowHarmless, but annoying. Only observed on GTK2
```
Traceback (most recent call last):
File "/home/paulmc/fsl/conda/fsl/lib/python3.9/site-packages/wx/lib/agw/aui/framemanager.py", line 3146, in OnActivate
self._owner_mgr.OnFloating...Harmless, but annoying. Only observed on GTK2
```
Traceback (most recent call last):
File "/home/paulmc/fsl/conda/fsl/lib/python3.9/site-packages/wx/lib/agw/aui/framemanager.py", line 3146, in OnActivate
self._owner_mgr.OnFloatingPaneActivated(self._pane_window)
File "/home/paulmc/fsl/conda/fsl/lib/python3.9/site-packages/wx/lib/agw/aui/framemanager.py", line 8538, in OnFloatingPaneActivated
raise Exception("Pane window not found")
Exception: Pane window not found
```https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/193update update check2021-09-13T16:50:20+01:00Paul McCarthyupdate update checkThe update check option no longer works - it was based on the standalone release model. It should be changed so that it retrieves the latest available FSLeyes version on conda-forge.The update check option no longer works - it was based on the standalone release model. It should be changed so that it retrieves the latest available FSLeyes version on conda-forge.Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/197Location panel should show LUT label for surface overlays2021-08-05T18:51:32+01:00Paul McCarthyLocation panel should show LUT label for surface overlaysThe location panel will show the LUT label (e.g ROI name) at the current voxel when a label overlay is selected. It should do the same when a mesh overlay with LUT enabled is selected.The location panel will show the LUT label (e.g ROI name) at the current voxel when a label overlay is selected. It should do the same when a mesh overlay with LUT enabled is selected.https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/196Cannot specify the same LUT file more than once on command line2021-08-05T18:51:32+01:00Paul McCarthyCannot specify the same LUT file more than once on command lineA command line invocation like this:
```
fsleyes lh.white.surf.gii -vd lh.data.txt -ul -l lh.lut \
lh.pial.surf.gii -vd lh.data.txt -ul -l lh.lut
```
Will result in an error like this:
```
WARNING idle.py 579: ...A command line invocation like this:
```
fsleyes lh.white.surf.gii -vd lh.data.txt -ul -l lh.lut \
lh.pial.surf.gii -vd lh.data.txt -ul -l lh.lut
```
Will result in an error like this:
```
WARNING idle.py 579: __idleLoop - Idle task realOnLoad crashed - ValueError: Duplicate alternate value (cho
ice: scan1): scan1
Traceback (most recent call last):
File "/home/paulmc/Projects/fslpy/fsl/utils/idle.py", line 576, in __idleLoop
task.task(*task.args, **task.kwargs)
File "/home/paulmc/Projects/fsleyes/fsleyes/actions/loadoverlay.py", line 252, in realOnLoad
onLoad(pathIdxs, overlays)
File "/home/paulmc/Projects/fsleyes/fsleyes/parseargs.py", line 2870, in onLoad
overlay=overlay)
File "/home/paulmc/Projects/fsleyes/fsleyes/parseargs.py", line 2456, in _applyArgs
args, overlayList, displayCtx, target, name, longArgs[name])
File "/home/paulmc/Projects/fsleyes/fsleyes/parseargs.py", line 3009, in _applySpecialOption
return applyFunc(args, overlayList, displayCtx, target)
File "/home/paulmc/Projects/fsleyes/fsleyes/parseargs.py", line 3523, in _applySpecial_MeshOpts_lut
args.lut = _applyLookupTable(args.lut, overlayList, displayCtx)
File "/home/paulmc/Projects/fsleyes/fsleyes/parseargs.py", line 3533, in _applyLookupTable
lut = colourmaps.registerLookupTable(lut, overlayList, displayCtx).key
File "/home/paulmc/Projects/fsleyes/fsleyes/colourmaps.py", line 699, in registerLookupTable
instance=opts)
File "/home/paulmc/Projects/fsleyes-props/fsleyes_props/properties_types.py", line 518, in addChoice
self.__updateChoices(choices, altLists, instance)
File "/home/paulmc/Projects/fsleyes-props/fsleyes_props/properties_types.py", line 584, in __updateChoices
alternates = self.__generateAlternatesDict(altLists)
File "/home/paulmc/Projects/fsleyes-props/fsleyes_props/properties_types.py", line 547, in __generateAlternatesDict
'(choice: {}): {}'.format(choice, alt))
ValueError: Duplicate alternate value (choice: scan1): scan1
```
Because the `fsleyes.parseargs` module just passes the LUT file name to the `fsleyes.colourmaps.registerLookupTable` function, which auto-generates the same key for both instances, with the second one being rejected.
Need to either detect this, or generate unique keys.
As an aside, when `registerLookupTable` is passed a file name like `a.b.c.lut`, it assigns the key `a` (i.e. splits on periods, and takes the first token), which is problematic for groups of files with a common prefix (e.g. `scan1.lh.lut`, `scan1.rh.lut`). Should just drop the last token.https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/194file-tree import error2021-08-05T17:37:10+01:00Michiel Cottaarmichiel.cottaar@ndcn.ox.ac.ukfile-tree import errorfile-tree is currently listed as an extra requirement, however fsleyes crashes without it:
```
File "/Users/ndcn0236/.local/pipx/venvs/fsleyes/lib/python3.9/site-packages/fsleyes/plugins/controls/filetreepanel/__init__.py", line 17, in...file-tree is currently listed as an extra requirement, however fsleyes crashes without it:
```
File "/Users/ndcn0236/.local/pipx/venvs/fsleyes/lib/python3.9/site-packages/fsleyes/plugins/controls/filetreepanel/__init__.py", line 17, in <module>
import file_tree
ModuleNotFoundError: No module named 'file_tree'
```
file-tree (and file-tree-fsl) should be either made one of the main requirements or the ImportError should be caught.https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/195Erroneous positioning of line vectors for non-isotropic voxels2021-05-25T09:44:39+01:00Paul McCarthyErroneous positioning of line vectors for non-isotropic voxelsIncorrectly setting `resolution` in `GLImageObject.generateVoxelCoordinates2D` causes the bounding box of the displayed slice to be incorrect
![image](/uploads/b643d6689654be1de6fb9804c2d8beda/image.png)Incorrectly setting `resolution` in `GLImageObject.generateVoxelCoordinates2D` causes the bounding box of the displayed slice to be incorrect
![image](/uploads/b643d6689654be1de6fb9804c2d8beda/image.png)Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/192FSLeyes 1.0.02021-04-23T17:52:59+01:00Paul McCarthyFSLeyes 1.0.0 - fslpy 3.6.0
- sort out documentation hosting (pages+userdoc+apidoc) - fslpy 3.6.0
- sort out documentation hosting (pages+userdoc+apidoc)https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/191Add "sample along line" tool2021-04-16T16:17:03+01:00Paul McCarthyAdd "sample along line" toolAllow the user to draw a line across an image slice, then pop up a plot which shows the voxel intensities along that lineAllow the user to draw a line across an image slice, then pop up a plot which shows the voxel intensities along that linehttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/24Distance tools2021-04-16T15:44:16+01:00Paul McCarthyDistance toolsCalculate distance between two locations. This should be fairly easy.
More advanced (when you add surface support) would be to calculate distances on the surface, taking curvature into account.
You could use existing tools to perform t...Calculate distance between two locations. This should be fairly easy.
More advanced (when you add surface support) would be to calculate distances on the surface, taking curvature into account.
You could use existing tools to perform the distance calculations, e.g.:
https://github.com/margulies/surfdistFSLeyes 1.0.0Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/190Re-organise FSLeyes plugin architecture2021-04-14T15:11:31+01:00Paul McCarthyRe-organise FSLeyes plugin architectureRe-organise plugin architecture, and migrate some built-in controls/tools to the plugin architecture, to provide some concrete examples to help others develop FSLeyes plugins. Also improve profile switching, so that users can switch betw...Re-organise plugin architecture, and migrate some built-in controls/tools to the plugin architecture, to provide some concrete examples to help others develop FSLeyes plugins. Also improve profile switching, so that users can switch between different tools/modes (e.g. crop, annotations, edit, etc).
This is being addressed in !234
- [x] Menu item order control
- [x] Ignore built-in classes when loading from a plugin file
- [x] Refresh API documentation
- [x] Documentation for new plugin features
- [x] Update testshttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/78Fix synced movie mode on all platforms2021-04-08T11:33:22+01:00Paul McCarthyFix synced movie mode on all platformsMovie mode involves [some hacks](fsleyes/views/canvaspanel.py#L808) on certain graphics cards. Try and make it work in a synchronised manner on all platforms.Movie mode involves [some hacks](fsleyes/views/canvaspanel.py#L808) on certain graphics cards. Try and make it work in a synchronised manner on all platforms.Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/187Add command line options to invert canvases2021-02-23T17:11:30+00:00Paul McCarthyAdd command line options to invert canvasesCommand line options to apply L/R U/D flips to specific canvases in an ortho view, or to a lightbox canvas. The functionality already exists, but it isn't exposed in the CLI, so this should be fairly straightforward to add.Command line options to apply L/R U/D flips to specific canvases in an ortho view, or to a lightbox canvas. The functionality already exists, but it isn't exposed in the CLI, so this should be fairly straightforward to add.Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/188GUI control for light position in 3D view2021-02-22T21:13:54+00:00Paul McCarthyGUI control for light position in 3D viewCurrently the light position in the 3D view can only be controlled via the command line, or programmatically. It should be trivial to add a GUI control for it.Currently the light position in the 3D view can only be controlled via the command line, or programmatically. It should be trivial to add a GUI control for it.Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/189fsleyes power spectrum DC 'bug'2021-02-22T20:42:01+00:00Paul McCarthyfsleyes power spectrum DC 'bug'Reported by @wclarke
As promised here is a description about the power spectrum issue. After looking into it the issue arises from the de-meaning step applied when normalisation is active.
Using the attached data I generate the spect...Reported by @wclarke
As promised here is a description about the power spectrum issue. After looking into it the issue arises from the de-meaning step applied when normalisation is active.
Using the attached data I generate the spectrum by running this in python:
```python
import nibabel as nib
import numpy as np
import matplotlib.pyplot as plt
data_file = 'wref.nii'
img = nib.load(data_file)
FID = img.get_fdata(dtype=np.complex64)
spectrum = np.fft.fftshift(np.fft.fft(FID[0,0,0,:]))
plt.figure(figsize=(15,8))
plt.plot(np.abs(spectrum),label='Magnitude')
plt.plot(np.real(spectrum),label='Real')
plt.plot(np.imag(spectrum),label='Imaginary')
plt.xlim([-200+2048,200+2048])
plt.legend()
plt.show()
```
![image](/uploads/a3d3e14a9cfa2636f3e426c165a32793/image.png)
But in Fsleyes it appears like this if _normalise to unit variance_ is checked
![image](/uploads/322bb707c9c82ef2698aa5f3d68b497b/image.png)
If it isn’t checked then we get the right thing (from the MRS point of view):
![image](/uploads/bbb0488e3736682f77de77a980754430/image.png)
This arises from the demeaning step on this line https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/blob/master/fsleyes/plotting/powerspectrumseries.py#L62
I imagine that this normalisation is applied for a good reason for non-MRS data, and this is desired behaviour. If that’s the case then it can wait for me to get around to creating an MRS plugin which will set all these options appropriately. We now have an MRS data format with all the required meta-data stored in a NIFTI header extension, so setting all the options programmatically is now actually achievable.Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/185Remove dependency on (free)glut2021-02-16T09:07:47+00:00Paul McCarthyRemove dependency on (free)glutFSLeyes currently depends on (Free)GLUT for rendering text to an opengl canvas (e.g. orientation labels in the ortho panel). However, GLUT requires a display - either a real display, or a virtual one provided by the likes of `xvfb-run`.
...FSLeyes currently depends on (Free)GLUT for rendering text to an opengl canvas (e.g. orientation labels in the ortho panel). However, GLUT requires a display - either a real display, or a virtual one provided by the likes of `xvfb-run`.
This complicates the use of FSLeyes for off-screen rendering, via the `fsleyes render` command. If we remove reliance on FreeGLUT, users should be able to run `fsleyes render` calls on headless machines. The `osmesa` library can be used to provide off-screen OpenGL capability, and `matplotlib` could be used to render fonts.Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/183Update singularity example in docs to use conda2021-02-16T09:06:21+00:00Paul McCarthyUpdate singularity example in docs to use condaPaul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/184FSLeyes seg-faults when an attempt is made to load a file for which the user ...2021-02-16T09:05:39+00:00Paul McCarthyFSLeyes seg-faults when an attempt is made to load a file for which the user does not have read accessReported by steve, running on rescompReported by steve, running on rescompPaul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/156Error running standalone builds in a shell with an active conda environment2021-02-10T18:51:30+00:00Paul McCarthyError running standalone builds in a shell with an active conda environment```
Traceback (most recent call last):
File "/Applications/FSLeyes.app/Contents/Resources/__boot__.py", line 391, in <module>
_run()
File "/Applications/FSLeyes.app/Contents/Resources/__boot__.py", line 370, in _run
exec(comp...```
Traceback (most recent call last):
File "/Applications/FSLeyes.app/Contents/Resources/__boot__.py", line 391, in <module>
_run()
File "/Applications/FSLeyes.app/Contents/Resources/__boot__.py", line 370, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File "/Applications/FSLeyes.app/Contents/Resources/entrypt.py", line 43, in <module>
fm.main()
File "fsleyes/filtermain.pyc", line 169, in main
File "fsleyes/main.pyc", line 213, in main
File "fsleyes/__init__.pyc", line 253, in initialise
File "fsleyes/plugins.pyc", line 173, in <module>
File "pkg_resources/__init__.pyc", line 959, in <module>
File "pkg_resources/__init__.pyc", line 963, in Environment
File "pkg_resources/__init__.pyc", line 190, in get_supported_platform
File "pkg_resources/__init__.pyc", line 395, in get_build_platform
File "sysconfig.pyc", line 697, in get_platform
File "sysconfig.pyc", line 558, in get_config_vars
File "sysconfig.pyc", line 429, in _init_posix
ModuleNotFoundError: No module named '_sysconfigdata_x86_64_apple_darwin13_4_0'
2019-09-13 16:41:18.389 fsleyes[73514:2806783] FSLeyes Error
```FSLeyes 0.33.0Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/182Automatically project volume onto surface2020-10-05T16:43:31+01:00Paul McCarthyAutomatically project volume onto surfacein other words, convert a NIFTI image into vertex data for a specific surface.in other words, convert a NIFTI image into vertex data for a specific surface.Paul McCarthyPaul McCarthyhttps://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/issues/181Histogram normalisation should account for bin widths2020-06-22T14:43:29+01:00Tom NicholsHistogram normalisation should account for bin widthsA user showed me a set of overlapping histograms of several images that had the same number of non-zero voxels. They had set the histogram mode to "Probability" and the histograms roughly overlapped but they had vastly different heights...A user showed me a set of overlapping histograms of several images that had the same number of non-zero voxels. They had set the histogram mode to "Probability" and the histograms roughly overlapped but they had vastly different heights... it didn't make sense, I thought, since they had selected "Probability". However, I realised this was because the histogram bin widths were completely different, and so the *integral* of the histograms were unequal.
Can I propose that what you really want for a "Probability" normalisation is having an integral of 1.0 instead of just having bar-heights sum to 1, i.e. so that the normalisation accounts for the bin width? (See the difference between `normed=True` and `density=True` in [numpy's histogram](https://numpy.org/doc/stable/reference/generated/numpy.histogram.html))
Fix should just amount to changing this one line but I don't know the value of the bin spacing: https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/blob/master/fsleyes/profiles/histogramprofile.py#L430