Dear all,
I am trying to apply the following to code to my tiff image. run("Subtract Background...", "rolling=50 light"); run("Unsharp Mask...", "radius=2 mask=0.60"); run("Gamma...", "value=0.95"); run("Color Balance..."); setMinAndMax(-43, 211); The problem is with the setMinAndMax function, when i apply this code i am asked to put manually my min and max (and what i want is to set automatically the color balance in the red channel between -43 and 211, but i do not know why i should do it manually) Does anyone know how can i range automatically my red channel to these values? Thank you in advance! -- - Adrián Villalba Felipe. https://es.linkedin.com/in/adrianvillalba -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Good day,
the list of macro functions <https://imagej.nih.gov/ij/developer/macro/functions.html> tells us: "*setMinAndMax(min, max, channels)* Sets the display range of specified channels in an RGB image, where 4=red, 2=green, 1=blue, 6=red+green, etc. Note that the pixel data is altered since RGB images, unlike composite color images, do not have a LUT for each channel." I don't know how you can assign a negative value because RGB is 0...255 in each color channel. HTH Herbie -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Herbie, this is what i want to apply automatically (I extract the
negative value from the x axis in this screenshot). Do you know how can i apply this in my macro? Thank you, 2018-02-05 21:33 GMT+01:00 Herbie <[hidden email]>: > Good day, > > the list of macro functions > <https://imagej.nih.gov/ij/developer/macro/functions.html> > tells us: > > "*setMinAndMax(min, max, channels)* > Sets the display range of specified channels in an RGB image, where 4=red, > 2=green, 1=blue, 6=red+green, etc. Note that the pixel data is altered > since > RGB images, unlike composite color images, do not have a LUT for each > channel." > > I don't know how you can assign a negative value because RGB is 0...255 in > each color channel. > > HTH > > Herbie > > > > -- > Sent from: http://imagej.1557.x6.nabble.com/ > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- - Adrián Villalba Felipe. https://es.linkedin.com/in/adrianvillalba -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html screenshot.png (2M) Download Attachment |
Does this
setMinAndMax( -43, 211, 4 ); work for you? Please note that you end up again with a range from 0 ... 255 per channel. HTH Herbie -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
No, it doesn't work.
The problem is not either the range, even with values between 0 and 255, the setMinAndMax(x,y,4); command asks me for the color balance and i just want the macro to do it automatically. 2018-02-05 22:03 GMT+01:00 Herbie <[hidden email]>: > Does this > > setMinAndMax( -43, 211, 4 ); > > work for you? > > Please note that you end up again with a range from 0 ... 255 per channel. > > HTH > > Herbie > > > > -- > Sent from: http://imagej.1557.x6.nabble.com/ > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- - Adrián Villalba Felipe. https://es.linkedin.com/in/adrianvillalba -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Sorry Dear,
but this *single* command setMinAndMax( -43, 211, 4 ); works for me as described. No dialog, no asking .... Clueless Herbie :::::::::::::::::::::::::::::::::::::::::::: Am 05.02.18 um 22:05 schrieb Adrián Villalba: > No, it doesn't work. > The problem is not either the range, even with values between 0 and 255, > the setMinAndMax(x,y,4); command asks me for the color balance and i just > want the macro to do it automatically. > > 2018-02-05 22:03 GMT+01:00 Herbie <[hidden email]>: > >> Does this >> >> setMinAndMax( -43, 211, 4 ); >> >> work for you? >> >> Please note that you end up again with a range from 0 ... 255 per >> channel. >> >> HTH >> >> Herbie -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |