IJ.log("SHOW_ROI_MASKS selected");
</sxh>
Switching ON/OFF is controlled using 16bit binary a.k.a 16 digit binary number. 256 is
00000001000000009th digit from the right is “1”, the place where ON/OFF of DISPLAY_SUMMARY is controlled. 4096 is
000100000000000013th digit controls the ON/OFF of SHOW_ROI_MASKS. If you need to turn these options on,
0001000100000000both 9th and 13th digits should be 1. To construct this binary number, it simply is:
256 + 4096 = 4352 bin(4352) = 0001000100000000To check if “options” (a number) contains SHOW_ROI_MASKS, one compares if corresponding digit (13th) is turned ON. To do so, we use Bitwise AND.
(0001000100000000) AND (0001000000000000) result: 0001000000000000meaning that <sxh javascript> ((options&SHOW_ROI_MASKS)!=0) </sxh> is true. Above is a short example made for showing how to control ParticleAnalyzer options. ===== Arguments of Function could be with Variable Length ===== Javascript Function is a class that takes variable length of arguments. Even if there is no arguments declared in the function, one could add ones in runtime and could be retrieved from inside the function using Functions object 'Arguments'. <sxh javascript> normal way of writing function function add01(a, b) { return a+b; } using 'argument' object of class Function function add02(a, b) {
return arguments[0] + arguments[1];} IJ.log(add01(1, 2


