GithubHelp home page GithubHelp logo

image-funcut's People

Contributors

abrazhe avatar lowks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

image-funcut's Issues

atrous TypeError

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

live cursor

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.

categorize rois

It would be fun, to group rois on neurons, astrocytes, neuropil ect.

ROI manager window

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.

ROI size

In some data the smallest scroll change ROI size too much, resulting in either a too large ROI or a very very tiny one

New ROI handling interface

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:

  1. 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:

    • average (default)
    • standard deviation or higher-order moments
    • percentile (e.g. the median)
    • mode
    • something else, user-defined.

    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

  2. clip the current frame to this area by one of:

    • converting each frame to a masked array
    • by setting all pixels outside the frame to zero (or other constant value)
    • by cropping the frame to the boundary box of the area.
  3. 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:

  1. Extract pixel values along the path (possibly averaging/reducing around some neighborhood also) and show/store them as 2D arrays. If a path is branched, do the same along each branch and create a collection of such 2D views
  2. It should be possible to add new nodes to line segments,
  3. It should be possible to add new line segments to existing nodes (branching)
  4. It should be possible to drag the path around preserving shape, it should be possible to drag each vertex or each edge individuall
  5. It should be possible for each segment of the path to create shorter line segments perpendicular to the main path (backbone-like) and then create collections of 2D reslices of the 3D image stacks for each of these shorted segments

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.

Average projection error after update

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'

Diameter export should include metadata

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.

Time series Export to mat

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)

ROI numbering

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.

Error when trying to show multiple channels

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'

view different combinations of channels in parallel.

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.

Which frames to work with when doing image stabilisation

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

issues with new version of traits?

  1. max_frames requires int, not long
  2. change image.aspect when showing time slice from linescan to auto by default (or add a switch for that)

add button to drop all ROIs

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.