abrazhe / image-funcut Goto Github PK
View Code? Open in Web Editor NEWView, analyse and transform dynamic imaging data
View, analyse and transform dynamic imaging data
frame_viewer.py
: On a Mac, adjusting the slider for frames is supposed to change the shown frame, but this doesn't happen until the user clicks on canvas.
Hi,
I am trying to run atrous file, using tif image (img.tif), using ubuntu14/anaconda2.1.0/python27, executing this:
import imfun
from imfun import atrous
from scipy.signal import convolve2d
wave = atrous.decompose2d_numpy(img,level=3)
Traceback (most recent call last):
File "", line 1, in
wave = atrous.decompose2d_numpy(img,level=3)
File "/home/jaimebayes/anaconda/lib/python2.7/site-packages/imfun/atrous.py", line 232, in decompose2d_numpy
return [w] + decompose2d(approx,level-1,upphi,boundary)
File "/home/jaimebayes/anaconda/lib/python2.7/site-packages/imfun/atrous.py", line 155, in decompose2d_weave
coefs = np.ones((level+1, sh[0], sh[1]),dtype=dtype)
File "/home/jaimebayes/anaconda/lib/python2.7/site-packages/numpy/core/numeric.py", line 183, in ones
a = empty(shape, dtype, order)
TypeError: data type "symm" not understood
when creating a figure window with the time trace of a ROI, it would be fun with a live cursor that moved on the time axes according to scrolling in the time-lapse movie. This will make it easy to confirm signals by eye in the movie, which are obious in the time-series.
It would be fun, to group rois on neurons, astrocytes, neuropil ect.
from #11 (comment)
@JonasCF: Since it is sometimes is hard to see all the ROIs maybe it would be nice with a list Showing the ROIs.This list could display ROI name, size, coordinates, give you the possibility to rename, group and delete ROIs. You could also use this list to mark the ROIs that you want to see time series from.
from #11 (comment)
@JonasCF: It would be fun to set standard roi diameter, since cells in a data set often have the same size for the entire movie and or data set.
In some data the smallest scroll change ROI size too much, resulting in either a too large ROI or a very very tiny one
Motivation: we need to have more versatile ROI types and streamline the way we operate on ROIs
Current state: at the moment, the user can create either a CircleROI (by left-clicking on a frame) or a LineScan (by right-clicking and dragging mouse while still pressing the right button). After a ROI has been added to the axes, it can be dragged about by left-click-dragging, resized by scrolling while hovering a mouse over it and removed by right-clicking a ROI.
What is needed: I would like to have circles, ellipses, rectangles, and closed polygons for area-type ROIs and straight lines, segmented lines and branching lines for path-type ROIs. I think we also need auto-tracking ROIs, i.e. ROIs, that would automatically adjust their position from frame to frame if image moves.
An area-type ROI should allow to:
Create time-series (or z-series in case of a z-stack) by taking all pixels inside the area and performing a specific grouping mathematical operation on these sets of pixels in each frame, such as:
This is relatively straightforward to add to be used from command line interface, e.g. from Jupyter notebook, but not as clear how to do this from GUI
clip the current frame to this area by one of:
It should be possible to drag the ROI around preserving shape, reshape ROI by keeping it's position (zoom, tilt, pull one edge or vertex of), and delete a ROI
A path-type ROI should allow to:
Problem:
Matplotlib widgets are not so easy (for me) to program, that's why I've been avoiding adding "inventory" buttons to switch between the ROI types in the first place.
I need to come up with a clear way of organizing a convenient user interface for these features that does the job, but stays out of the way.
when I press h on a active frame nothing happens (same before)
when I press z (worked before), now;
Traceback (most recent call last):
File "c:\Anaconda\lib\site-packages\matplotlib\backends\backend_wx.py", line 1
086, in _onKeyDown
FigureCanvasBase.key_press_event(self, key, guiEvent=evt)
File "c:\Anaconda\lib\site-packages\matplotlib\backend_bases.py", line 1833, i
n key_press_event
self.callbacks.process(s, event)
File "c:\Anaconda\lib\site-packages\matplotlib\cbook.py", line 540, in process
proxy(*args, **kwargs)
File "c:\Anaconda\lib\site-packages\matplotlib\cbook.py", line 415, in _call
_
return mtd(_args, *_kwargs)
File "c:\Anaconda\lib\site-packages\imfun\ui.py", line 1408, in frame_skip
show_f = self.mean_frame
AttributeError: 'Picker' object has no attribute 'mean_frame'
Traceback (most recent call last):
File "c:\Anaconda\lib\site-packages\matplotlib\backends\backend_wx.py", line 1
086, in _onKeyDown
FigureCanvasBase.key_press_event(self, key, guiEvent=evt)
File "c:\Anaconda\lib\site-packages\matplotlib\backend_bases.py", line 1833, i
n key_press_event
self.callbacks.process(s, event)
File "c:\Anaconda\lib\site-packages\matplotlib\cbook.py", line 540, in process
proxy(*args, **kwargs)
File "c:\Anaconda\lib\site-packages\matplotlib\cbook.py", line 415, in _call
_
return mtd(_args, *_kwargs)
File "c:\Anaconda\lib\site-packages\imfun\ui.py", line 1408, in frame_skip
show_f = self.mean_frame
AttributeError: 'Picker' object has no attribute 'mean_frame'
When metadata (sampling rate, pixels/um, stimulation times etc) is known for a frame sequence, then exporting diameters or time series from ROIs should include this information in the output.
It would be sometimes convenient to visually set/annotate different time epochs, such as stimulation or baseline directly from funcut user interface.
When exporting timeseries to mat, Changsi ask if some metadata could be included and if it could be created as a 3 dimentional array instead?
File should if possible contain 7 variables;
ROI name = ('roi1','roi2'....'roi10')
2)
ROI all (3D array) = (number of frames) x (number of channels) x (number of ROIs)
3)
ROI coordinates
4)
Frame rate
5)
GreenCh = (number of rows) x (number of columns) x (number of frames)
6)
RedCh = (number of rows) x (number of columns) x (number of frames)
7)
BlueCh = (number of rows) x (number of columns) x (number of frames)
From #11 (comment) :
@JonasCF: When you add ROIs, ROI number always increase, this means, if you placed 3 ROIs and delete one, the next one you place will be named ROI4, when placing many ROIs this can be confusing. Also if you *Drop all ROIs' it continues to count from potentially a high number. I think it might make more sense if the ROIs on the frame always go from 1 and up.
press on show timeseries give this error:
File "c:\Anaconda\Scripts\funcut.py", line 536, in _show_all_timeseries_btn_fi
red
self.parent.picker.show_zview()
File "c:\Anaconda\lib\site-packages\imfun\ui.py", line 1570, in show_zview
for lx in l.legendHandles:
AttributeError: 'NoneType' object has no attribute 'legendHandles'
in show_all_timeseries_btn_fired
in Picker.show_zview()
area <itertools.grouper object at 0x0000000020928390>
[u'r']
Exception occurred in traits notification handler for object: <main.FrameSeq
uenceOpts object at 0x000000001BDCCDB0>, trait: show_all_timeseries_btn, old val
ue: , new value: 0
Traceback (most recent call last):
File "c:\Anaconda\lib\site-packages\traits\trait_notifiers.py", line 340, in _
call
self.handler( *args )
File "c:\Anaconda\Scripts\funcut.py", line 536, in _show_all_timeseries_btn_fi
red
self.parent.picker.show_zview()
File "c:\Anaconda\lib\site-packages\imfun\ui.py", line 1570, in show_zview
for lx in l.legendHandles:
AttributeError: 'NoneType' object has no attribute 'legendHandles'
in show_all_timeseries_btn_fired
in Picker.show_zview()
area <itertools.grouper object at 0x00000000666B25F8>
[u'r']
Exception occurred in traits notification handler for object: <main.FrameSeq
uenceOpts object at 0x000000001BDCCDB0>, trait: show_all_timeseries_btn, old val
ue: , new value: 0
Traceback (most recent call last):
File "c:\Anaconda\lib\site-packages\traits\trait_notifiers.py", line 340, in _
call
self.handler( *args )
File "c:\Anaconda\Scripts\funcut.py", line 536, in _show_all_timeseries_btn_fi
red
self.parent.picker.show_zview()
File "c:\Anaconda\lib\site-packages\imfun\ui.py", line 1570, in show_zview
for lx in l.legendHandles:
AttributeError: 'NoneType' object has no attribute 'legendHandles'
in show_all_timeseries_btn_fired
in Picker.show_zview()
area <itertools.grouper object at 0x0000000086A4D8D0>
[u'r']
Exception occurred in traits notification handler for object: <main.FrameSeq
uenceOpts object at 0x000000001BDCCDB0>, trait: show_all_timeseries_btn, old val
ue: , new value: 0
Traceback (most recent call last):
File "c:\Anaconda\lib\site-packages\traits\trait_notifiers.py", line 340, in _
call
self.handler( *args )
File "c:\Anaconda\Scripts\funcut.py", line 536, in _show_all_timeseries_btn_fi
red
self.parent.picker.show_zview()
File "c:\Anaconda\lib\site-packages\imfun\ui.py", line 1570, in show_zview
for lx in l.legendHandles:
AttributeError: 'NoneType' object has no attribute 'legendHandles'
When the vessel is dark and surrounding is bright it must be useful to invert the image before vessel tracing.
When loading images it would be useful to load different combinations of channels in parallel.
scrolling should then make all previews move in parallel and ROIs should show on all of them too.
It would be useful to see red channel at the same time as red + green.
Also when we choose all channels, I am afraid that Blue channel potentially can contaminate our signal with some filter settings in the microscope.
We have a movie where the first frame (actually 2nd) frame is weird, maybe this effects the stabilisation, it would be cool to be able to delete frame that Fiona have created wrong, it seems that it sometimes involves more than the first frame, this is absolutely not urgent
Problem: sometimes user selects by purpose or accident a lot of unnecessary ROIs or accidentally make the ROIs supersmall. There should be a button to quickly remove all the ROIs to help with this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.