User Tools

Site Tools


Sidebar

Top
Seminar
Courses
Textbooks
Documents
Downloads (-2016)
Downloads (2016-)
Weblog
RSS aggregates
Discussions
Archives


EMBL BioImage Data Analysis

EuBIAS

NEUBIAS

—- Contact
CMCI Alumni
ALMF
EMBL Heidelberg
EMBL Intranet


Popularity Ranking


Timeline of @cmci_

cmci_ avatar

RT @WimJHH: EMBL Heidelberg workshop "Cryo-EM in Industry & Academia", 6-8 February 2019. Success stories, new technologies, industry chall…
About 4 hours, 55 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

@f_levet @BertrandVernay I made it.
About 5 hours, 45 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @haesleinhuepf: One more session on #ImageJ short cuts: SHIFT+U opens the command tree. I didn't know this one. Thanks @BertrandVernay a…
About 5 hours, 57 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

@ManuelTHERY @martinjones78 @NEUBIAS_COST Slowly Manu
About 15 hours, 39 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

@laure_plantard I can’t track JY himself with Trackmate. Metaphysical contradiction.
About 17 hours, 30 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

“2 chapters of my dissertation was only possible with Trackmate”
About 18 hours, 59 mins ago by: Kota Miura (@cmci_)
blogtng:blogtop
Algorithm FRAP Fiji ImageJ ImageJ Plugin ImageJ Plugin 3Dviewer Imaris Java Javascript Python R bias blog dokuwiki fiji google imagej java libraries matlab meetings neubias news papers python references software webadmin




CMCI weblog

Marriage Matching Algorithm

Consider that we have probe 1 and 2 labeling some molecule as dots, and for each cell we have several signals for each probe, cf. 3 dots for probe 1 and 2 dots for probe 2. The we have an assignment that we want to pair them each, leaving one probe 1 dot unpaired (cf. In my case I know that a probe 1 dot and a probe 2 dot are on a same chromosome.) What would be the algorithm?

In broader sense, this is a combinatorial optimization problem but I thought there could be simpler way of doing this.. then following is some possibilities.

One way is to construct a cost function, such as “sum of distace between paired”, calculate cost funciton for all possible combinations and choose the one with the lowest sum.

I found otherway of doing this, by so-called "stable marriage algorithm". In this case, same each number of boys and girls are matched.

In Javascript it should be as follows:

function make_matches(gb, bg){
  var N = gb.length;
  var boy = [], girl = [], position = [], rank = [];
  var b, g, r, s, t;
  for (g = 1; g <= N; g++){
    rank[g] = [N+1];
    for (r = 1; r <= N; r++){
      b = gb[g-1][r-1];
      rank[g][b] = r;
    } 
    boy[g] = 0;
  }
  for (b = 1; b <= N; b++){
    girl[b] = [0];
    for (r = 1; r <= N; r++){
      girl[b][r] = bg[b-1][r-1];
    }
    position[b] = 0;
  }
  for (b = 1; b <= N; b++){
    s = b;
    while (s != 0){
      g = girl[s][++position[s]];
      if (rank[g][s] < rank[g][boy[g]]){
        t = boy[g]; boy[g] = s; s = t;
      }
    }
  }
  return boy;
}

Only the problem when applying this to a problem with non-equal number of boys and girls population. For this case, either modify the above algorithm, or prepare a dummy with very low ranking to satisfy the equal number of populaiton for using the algorithm as the above.

more references

http://www.dcs.gla.ac.uk/research/algorithms/stable/

http://www.scopus.com/results/citedbyresults.url?sort=plf-f&cite=2-s2.0-0036557486&src=s&imp=t&sid=VGefBNpN1mm6vQdl2aIysKs:30&sot=cite&sdt=a&sl=0&origin=inward&txGid=VGefBNpN1mm6vQdl2aIysKs:2

http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6WH3-461T492-4&_user=656666&_coverDate=04/30/2002&_rdoc=1&_fmt=high&_orig=search&_sort=d&_docanchor=&view=c&_acct=C000035599&_version=1&_urlVersion=0&_userid=656666&md5=8a948aa89d2b2682f26124c71e0dca5c

Bleach Correction (2)

As I test through different method further

  1. Phair's method (or simple ratio)
  2. Exponential decay fitting (or exponential ratio, I call)
  3. Histogram streching,

all these methods are not really satisfactory. so I kept on searching for other methods and I tested something not used often, which is called “Histgram Matching”, and it seems to work better. Bleached images are better be blurred a bit. I might try implementing it as another method for bleaching correction.

Followings are links related to this method, which I referred to.

Histogram equalizaiton theory (by R. Fisher, S. Perkins, A. Walker and E. Wolfart.@ Image Processing Learning Resources).

I also refrred to Digital Image Processing using Matlab“ but it was too simply formulated (and, the matlab function which should be used is indicated but too short).

Paper: “A statistical approach for intensity loss compensation of confocal microscopy images”, Gopinath et al (2007) J. of microscopy ( Link). This paper tries to correct the acquistion bleaching while the image itself is changing a lot (the sample seems to be internalizing cell surface recepter, so from diffuse signal to dotty signals). In case of sequences with less changes in signal shape, the problem is more simple and straightforward, but such dynamic version should be already in our sight. (by the way, I am always amazed by works which Luby-Phelps is involved in. When I found the name on this paper, amazed again…).

Point Operations
CMPUT 206, Instructor: NilanjanRay
(powerpoint slides in PDF)

Java library: source for historam matching is in Burger & Burge website, chapter 5.
"Digital Image Processing: An algorithmic introduction uing Java"

Photobleaching Correction -3D time series

There are several IJ tools available for 2D time series bleaching correction, but seems not with 3D:

2D-t tools:

    • Phair's double normalization method. Dependent on ratio, similar to the above, but can specify reference area (if my understanding is correct).
    • proposes two ways,
      1. conceptually similar to above two: estimate the correction ratio. But this is done by fitting exponential decay curve and use decay parameter.
        1. <jsm> I_c(t) = I(t) / exp^{-\tau t}</jsm>
      2. use “enhance contrast”. framewise Histogram streching.

Among these, exponential decay method is theoretically clean (but in practice, timeseries are not teoretical…).


Anycase, there should be 3D-t bleach correction tool (and I need it NOW). I might make some quick solution using two methods, one using division of first frame and the other with exponential fitting.

By the way, bleaching corrected images cannot basically be used for intensity quantification (FRAP, on the other hands, correct bleaching after measuring the raw image). If you are analyzing shapes or positions, no problem for quantification.


here is the “ratio” version:

macro "Bleach Corection 3D-t by ratio"{
	run("Duplicate...", "title=bleach_corrected duplicate");
	getDimensions(width, height, channels, slices, frames);
	if (frames == 1) {
		uslices = getNumber("how many z slices/timepoint?", 1);
		if ((slices%uslices) !=0) exit("that slice number dows not match with the current stack");
		frames = slices / uslices;
	}
	tIntA = newArray(frames);
	setBatchMode(true);
	for(i=0; i<frames; i++){
		startf = (i*slices)+1;
		endf = (i+1)*slices;
		op ="start="+startf+" stop="+endf+" projection=[Sum Slices]";
		run("Z Project...", op);
		//print(op);
		getRawStatistics(nPixels, mean);
		if (i==0) tIntA[i] = mean;
		else tIntA[i] = mean/tIntA[0];
		close();
	}
	setBatchMode("exit and display");
	tIntA[0] =1;
	for(i=0; i<frames; i++){
		for(j=0; j<slices; j++){
			curframe = i*slices + j+1;
			setSlice(curframe);
			//print("frame"+curframe + " factor" + tIntA[i]);
			op = "value="+tIntA[i]+" slice";
			run("Divide...", op);
		}
		print("time point:"+i+1 + "  factor" + tIntA[i]);
	}	
}


Before Correction (each row is a time point, with 8 z-slices)
 Before each row is a time point Average intensity along stack slices. 5 peaks corresponds to 5 time points. Before


After Correction
After After



entry generator

Weblog Archive

blogtng/blogtop.txt · Last modified: 2016/05/24 05:46 (external edit)