documents:201021ijmacrofragments
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documents:201021ijmacrofragments [2020/10/26 16:40] – kota | documents:201021ijmacrofragments [2021/12/07 09:09] (current) – kota | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
====== ImageJ Macro Fragments ====== | ====== ImageJ Macro Fragments ====== | ||
Line 5: | Line 6: | ||
===== Getting the number of Cores ===== | ===== Getting the number of Cores ===== | ||
- | <code> | + | <sxh js> |
th = eval(" | th = eval(" | ||
print(th); | print(th); | ||
- | </code> | + | </sxh> |
+ | |||
+ | ===== Loading ROIs from a file in Internet ===== | ||
+ | |||
+ | shell command " | ||
+ | |||
+ | <sxh js> | ||
+ | run(" | ||
+ | path = getDirectory(' | ||
+ | print(path) | ||
+ | exec(" | ||
+ | roiManager(" | ||
+ | roiManager(" | ||
+ | File.delete(path); | ||
+ | </ | ||
+ | |||
+ | ===== Getting Pixel Coordinates within a Polygon ROI ===== | ||
+ | |||
+ | <sxh js> | ||
+ | Roi.getContainedPoints(xps, | ||
+ | for(i=0; i< | ||
+ | xpos = xps[i]; | ||
+ | ypos = yps[i]; | ||
+ | pixval = getPixel(xpos, | ||
+ | print(" | ||
+ | } | ||
+ | </ | ||
===== Ways of getting the file basename ===== | ===== Ways of getting the file basename ===== | ||
- | <code> | + | <sxh js> |
filepath = "/ | filepath = "/ | ||
Line 33: | Line 61: | ||
print(" | print(" | ||
- | </code> | + | </sxh> |
===== Convert black pixels to white in RGB image ===== | ===== Convert black pixels to white in RGB image ===== | ||
- | <code> | + | <sxh js> |
for (j =0; j< | for (j =0; j< | ||
for (i=0; i< | for (i=0; i< | ||
Line 66: | Line 94: | ||
return bf; | return bf; | ||
} | } | ||
- | </code> | + | </sxh> |
documents/201021ijmacrofragments.1603730422.txt.gz · Last modified: 2020/10/26 16:40 by kota