post:meanintinellipse.m

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
post:meanintinellipse.m [2019/10/11 15:37] – pseudomoanerpost:meanintinellipse.m [2019/11/18 16:45] (current) – pseudomoaner
Line 31: Line 31:
  
 %Rescale ellipse parameters %Rescale ellipse parameters
-xPx = procTrack.x(ind)/pxSize; +xPx = round(procTrack.x(ind)/pxSize); 
-yPx = procTrack.y(ind)/pxSize; +yPx = round(procTrack.y(ind)/pxSize); 
-minLenPx = procTrack.minorLen(ind)/pxSize; +minLenPx = round(procTrack.minorLen(ind)/pxSize); 
-majLenPx = procTrack.majorLen(ind)/pxSize;+majLenPx = round(procTrack.majorLen(ind)/pxSize);
 phi = procTrack.phi(ind); phi = procTrack.phi(ind);
  
Line 67: Line 67:
 **Example usage** **Example usage**
  
 +<code matlab>
   imgLoc = 'FluoImg.tif';   imgLoc = 'FluoImg.tif';
   trackLoc = 'Tracks.mat';   trackLoc = 'Tracks.mat';
   load(trackLoc,'procTracks')   load(trackLoc,'procTracks')
      
 +  %Get the pixel size from the input image
 +  imgInfo = imfinfo(imgLoc);
 +  pixelSize = 1/imgInfo.XResolution;
 +  
 +  %Load the image
 +  imPlane = double(imread(startImgLoc,'Index',1));
 +  
 +  %Get the mean and total fluorescence of the object in track 10 at timepoint 1
 +  [meanFluo,totalFluo] = meanIntInEllipse(imPlane,procTracks(10),1,pixelSize);
 +</code>
 + 
 +**Example output:** Histogram of mean object intensities for a set of tracks with an associated fluorescence image at their first timepoint. For more details see [[post:labelstartandendfluocells.m]].
 +
 +{{ :post:fluosplitexample2.png?nolink&400 |}}
  • post/meanintinellipse.m.1570804675.txt.gz
  • Last modified: 2019/10/11 15:37
  • by pseudomoaner