use /Volumes/TBU_main03/ost4dgood/TB2167_080416.ost


TODO pixel intensity tool should NOT be affected by contrast&brightness!!!!
TODO >, suggests boolean. wrong type


3h40m10s ===================
turns on about here. impossible, too many false candidates.
DIC autolin?



4h1m10s =====================
(27 cells?)


E[r]=8 or so (manually),  6 from autodetect


2009-07-09
detects this perfectly, by finding all sigma, removing candidates with sigma<normalsigma/2
normalsigma is the second largest sigma
very effective against candidates due to too large shell

not perfect after calculating sigma more precisely


2009-07-13
one nuclei created in an indentation in the edge

5h 5h1m50s  ====== 
(100 cells?)



E[r]=5 or so


6h ============
(170-200 cells)

E[r]=5 or so



aim: 200 cells




=======testing axis detection======
using PCA


4h36m10s perfect time





===================== feature scale detection ======================

/**
				 * Lindebergs theory of finding kernel size
				 * http://www.wisdom.weizmann.ac.il/~deniss/vision_spring04/files/mean_shift/mean_shift.ppt
				 * gaussian pyramids?
				 * can use for radius selection? O(n) for each level, need not test many. can calc approximate L-function from points
				 * 
				 * Lindeberg: ``Scale-space'', In: Encyclopedia of Computer Science and Engineering (Benjamin Wah, ed), John Wiley and Sons, Volume~IV, pages 2495--2504, Hoboken, New Jersey, Jan 2009. dx.doi.org/10.1002/9780470050118.ecse609 (Sep 2008) (PDF 1.2 Mb) 
				 * ftp://ftp.nada.kth.se/CVAP/reports/Lin08-EncCompSci.pdf
				 * 
				 * Lindeberg
				 * http://www.nada.kth.se/~tony/earlyvision.html
				 * 
				 */
			
			
				
				/**
				 * detecting the right sigma:
				 * only do it with the middle plane so find it first.
				 * then convolve a single point with ricker wavelet for multiple sigma
				 * 
				 * [2.^(1:5) , 0.75 * 2.^(1:5)]
				 *  1.5000    2.0000    3.0000    4.0000    6.0000    8.0000   12.0000   16.0000 24.0000   32.0000
				 *
				 * ie two sequences of convolving with gaussian, then do differences afterwards.
				 * find argmax and we know sigma, hence r
				 * 
				 * r=C*sigma*[some resolution]
				 * C is related to PSF and should be given by user
				 * 
				 * 
				 *
				 * 
				 * 
				 * 
				 * 
				 */




===================== Conclusions =================================

* DoG is very efficient in 2D
* strategy works well: no false negatives when finding candidates, rely on filtering of false positives
* mean-shift is not very useful since it so closely resembles DoG in the search space
* overlap intensity filtering is the a key thing
* voronoi neighbour candidate pair generation is sensitive to false positives. seems to work well otherwise.
  alternative neighbour finding by distance works otherwise, but includes more contacts.
* false positives tend to be high frequency and can be removed with a cut-off.
  it is important that the DoG can properly assign higher frequencies.
* one lineage = 15min calculation?


ideas:
* analyze verified lineages, get statistics
* analyze verified lineages, find better thresholds or scorings
* use expected division times. at the same time, get names?
  "load template"
  or hard-code sulston naming scheme?
* wanted: shell that can be rotated in all directions. how to draw in 2d?

or find names by fitting model in 3d? difficult! if rotation is (quite) correct,
then reduced to bipartite matching. have center of mass overlap at least.

need to use hungarian algorithm, or modified dijkstra
http://en.wikipedia.org/wiki/Maximum_cardinality_matching#Maximum_bipartite_matchings
hungarian=Kuhn-Munkres algorithm, have it

rotation: can find long axis easily. know direction of it, by hand. one rotation axis left,
and to some extent time. dirty version: try many angles, it need not be fast. use average
time with the same # of nuclei

landmarks would speed up finding the last axis.

iterative algorithm exists otherwise, developed by SPIM-people. uses neighbours somehow,
polynomial time. no, not quite the same problem - they have less info. my problem is
a hyperdimensional version. neighbours might not be correct.

=> build table of neighbours for each cell. match between (kuhn-munkres). fit.
(voronoi here. would really help to know contact area! ?)





//not these. closely related, maximum cardinality
http://en.wikipedia.org/wiki/Edmonds-Karp_algorithm   (exists in jgrapht)
http://en.wikipedia.org/wiki/Relabel-to-front_algorithm


================== references =========================

 * http://en.wikipedia.org/wiki/Scale-invariant_feature_transform
				 * also has equation for angle
				 * 
				 * www.ecs.syr.edu/faculty/lewalle/wavelets/mexhat.pdf 
				 * doubling sigma is correct to approximate mexican hat
				 
				 
				 


