EventUtil

Home Forums Scripts EventUtil

  • Stéphane Ory

    Hi,

    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.

    Best.

     

    Stéphane

    Stephane Dallongeville

    Hi Stephane,

    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,

    – Stephane

    Stéphane Ory

    Dear Stéphane,

     

    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.

    take care.

    Stéphane

    Stephane Dallongeville

    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.

    Best,

    – Stephane

    Stéphane Ory

    OK… Thanks. I will therefore stick to (and try to improve) the protocol I used.

    Thanks you for your help.

     

    Best.

    Stéphane

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Scripts’ is closed to new topics and replies.