Using flow variables with the Spot Detection node

Hi guys,

I’m trying to use the Spot Detector node with a threshold controlled by a flow variable. I’m a little confused about the input format for the threshold. It requires a scale config array but I can’t find good literature about what this should actually look like. I’ve tried collection columns and lists but I can’t get it to work. Has anyone successfully used the spot detector with a flow variables for the threshold?

Here is the node description:

“Based on Extraction of spots in biological images using multiscale products , Jean-Christophe Olivo-Marin Pattern Recognition 35 . This plugin uses currently some GPL code form Icy. To change the threshold factors using flow variables, you have to change the (2 * (n + 1) - 1)th value of the scaleConfig array. For example if you want to change threshold factor 0, you have to change value (2 * (0 + 1) - 1) = 1 of the scaleConfig, or if you want to change threshold factor 2 you have to change the (2 * (2 + 1) - 1) = 5th value in the scaleConfig array.”

Cheers,
Andrew

Hi @aseeber,

I totally understand your confusion. From algorithm side I can’t really help, unfortunately, but I can give hints on how the array should look like. In the “Options” tab of the configuration of the Spot Detection Node, you can add or remove scales. On the far right side of the flow variables tab, you can enter a name, and the respective configuration will be transformed to a flow vawraible. This way I found out that the scale array has twice as many entries as you added scale parameters.

It seems to be of format [<wavelet level 0 enabled/disabled = 1|0>, <wavelet level 0 threshold>, <wavelet level 1 enabled/disabled = 1|0>, <wavelet level 1 threshold>, ..., <wavelet level n enabled/disabled = 1|0>, <wavelet level n threshold>]

I hope that helps! Please let me know if you need help actually creating the array.
Cheers,
Lukas

3 Likes

Thanks for this reply and the detective work @LukasS! I’ll try and structure the array and see if it works.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.