Stéphane Ory March 31, 2020 at 5:33 pm
I’d like to write a script in which when I click on the left mouse button, it adds a point on a picture and print the properties of the selected point (mostly xy position and the pixel value for each channels) in the script window. I found EventUtil.isLeftMouseButton(e) that can probably do the job, but I do not know how to initialize e.
Thank you for your help.
StéphaneStephane Dallongeville April 14, 2020 at 5:41 pm
Honestly it would be difficult to do that by script. My question is :
Why just don’t use Point ROI that you add on the image. You can then retrieve all the wanted information (X, Y position and channel intensities) in the ROI panel (you can setup columns info) ?
Maintaining Ctrl key while you’re adding a new point will allow you to keep the Point ROI tool selected so you can add as many ROI point you want quickly.
Hope that helps,
Stéphane Ory April 14, 2020 at 6:18 pm
- This reply was modified 9 months, 2 weeks ago by Stephane Dallongeville.
Thank you for your answer. I had forgotten this Ctrl key!! Is there any possibilities to keep the information about the channel used when the selection is done?
In the mean time, I used the manual counting plugin for detection (1 color for 1 channel) and use ROI colors to count detection corresponding to a channel. However, it would be easier (and limit mistakes especially when channels used are not necessary the same) if we could keep channel information when the selection is done.
StéphaneStephane Dallongeville April 14, 2020 at 6:29 pm
Ok now i’m starting to see what you tried to do 😉 Indeed by default channel information is always set to ALL (-1 internally) and there is no way to change that behavior unfortunately. I guess you know you can change default color of ROI, and also change channel information globally (just doing multi selection of ROI then changing the channel index information). I don’t have better to propose but i admit that is not really convenient for what you’re trying to do.
– StephaneStéphane Ory April 14, 2020 at 6:37 pm
OK… Thanks. I will therefore stick to (and try to improve) the protocol I used.
Thanks you for your help.
The forum ‘Scripts’ is closed to new topics and replies.