# Length measurement based on fluorescence intensity cutoff

3 messages
Open this post in threaded view
|

## Length measurement based on fluorescence intensity cutoff

 This post was updated on . Hi there, I would like to enquire if there is any good quality check that I can incorporate into my code for length measurement of a fluorescence image. RefLineScan is a line scan of a linear structure with the indicated intensity values. For length measurement, I would like to use 0.2 as the cutoff. I.e. Pixel values >=0.2 will be considered as part of the length. For the e.g. below, the length of the structure is 7 pixels. Issue 1: However, I realised that if the signal:noise of the image is poor, this cutoff is not effective because hot pixels will be included as part of the structure length. Hence, may I know if there's a good way whereby I only consider a specific number of pixel as part of a structure length if consecutive pixel values are above the set cutoff. I.e. Consecutive pixels (for e.g. 3 pixels) need to have a value>=0.2 for them to be considered as part of the structure. Issue 2: Apart from length measurement, I would also like to measure the relative start position of the signal of interest. However, I'll encounter a problem if the start value is observed more than once (for e.g. 0.21 is the start value at position 2 but it also appears in position 8 of the array). May I know if there's an easy way to ensure that I pick position 2? //Start of code: RefLineScan = newArray(0.11, 0.21, 0.31, 0.41, 0.51, 0.45, 0.35, 0.21, 0.15); Array.show(RefLineScan);                                                 SingleCutOff = 0.2; //user defined cutoff                         RefLineScanII = newArray(RefLineScan.length);                         a = 0;                         for (cut=0; cut=SingleCutOff) {                                         RefLineScanII[a] = RefLineScan[cut];                                         a++;                                 }                                 startvalue = RefLineScanII[0];                                 if(startvalue == RefLineScan[cut]) {                                 CenStart = cut;                                 CenStartTab = Array.concat(CenStartTab, CenStart);                         }                 } Array.show(RefLineScanII); Array.show(Array.trim(RefLineScanII, a)); CenWidth = a; CenWidthTab = Array.concat(CenWidthTab, CenWidth); Array.show(CenStartTab, CenWidthTab); //End of code Lastly, the reason why I used array.concat() is because this code is part of a loop that measures length in multiple images. Array.concat() allows me to have all the values in the same table. Many thanks in advance. WJ -- Sent from: http://imagej.1557.x6.nabble.com/-- ImageJ mailing list: http://imagej.nih.gov/ij/list.html