Would you please help with setting the contrast of a multichannel image and propagating to the other n channels of the image in a macro.
When I click the box in the B&C window, the option to apply to the other channels is not recorded. I could write my own function to do this, but is there a way to use syntax added to setMinAndMax(0, 15117) to achieve this? Thank you! Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY 10016 Office: 646-501-0567 Cell: 914-309-3270 [hidden email]<mailto:[hidden email]> http://nyulmc.org/micros http://microscopynotes.com/ Acknowledgement in your publications and presentations of work performed in the Microscopy Core plays a vital role in securing support and the funding necessary to maintain and operate this valuable research resource. For publications that were made possible by work performed in the core, please use the acknowledgement statement "We thank the NYU Langone Microscopy Core for experimental and technical support" and include required grant numbers as listed here http://microscopynotes.com/ilabnyu/acknowledgements2017.pdf Please also consider staff for co-authorship if they played a key role in the study. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Greetings Michael,
I fear you need to loop through all n color channels. Regards Herbie ::::::::::::::::::::::::::::::::::::::::::::: Am 17.06.21 um 18:56 schrieb Cammer, Michael: > Would you please help with setting the contrast of a multichannel image and propagating to the other n channels of the image in a macro. > > When I click the box in the B&C window, the option to apply to the other channels is not recorded. > > I could write my own function to do this, but is there a way to use syntax added to setMinAndMax(0, 15117) to achieve this? > > Thank you! > > Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory > NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY 10016 > Office: 646-501-0567 Cell: 914-309-3270 [hidden email]<mailto:[hidden email]> > http://nyulmc.org/micros http://microscopynotes.com/ > Acknowledgement in your publications and presentations of work performed in the Microscopy Core plays a vital role in securing support and the funding necessary to maintain and operate this valuable research resource. For publications that were made possible by work performed in the core, please use the acknowledgement statement "We thank the NYU Langone Microscopy Core for experimental and technical support" and include required grant numbers as listed here http://microscopynotes.com/ilabnyu/acknowledgements2017.pdf > Please also consider staff for co-authorship if they played a key role in the study. > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Cammer, Michael-3
Hi Michael,
You can use Stack.setChannel(c); Then setMinAndMax(min, max); Jerome Le jeu. 17 juin 2021 à 18:58, Cammer, Michael < [hidden email]> a écrit : > Would you please help with setting the contrast of a multichannel image > and propagating to the other n channels of the image in a macro. > > When I click the box in the B&C window, the option to apply to the other > channels is not recorded. > > I could write my own function to do this, but is there a way to use syntax > added to setMinAndMax(0, 15117) to achieve this? > > Thank you! > > Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory > NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY > 10016 > Office: 646-501-0567 Cell: 914-309-3270 [hidden email] > <mailto:[hidden email]> > http://nyulmc.org/micros http://microscopynotes.com/ > Acknowledgement in your publications and presentations of work performed > in the Microscopy Core plays a vital role in securing support and the > funding necessary to maintain and operate this valuable research resource. > For publications that were made possible by work performed in the core, > please use the acknowledgement statement "We thank the NYU Langone > Microscopy Core for experimental and technical support" and include > required grant numbers as listed here > http://microscopynotes.com/ilabnyu/acknowledgements2017.pdf > Please also consider staff for co-authorship if they played a key role in > the study. > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thanks Kees,
yes of course, this is exactly what I meant by "loop through all n color channels". In your demo n = 2 and I understand that Michael would like to set the same min and max values for all color channels of his 16bit images. Furthermore, I think he doesn't deal with hyperstacks. Consequently, the following macro code should work: // getDimensions(w, h, n, s, f ); for ( i=0; i<n; i++ ) { Stack.setChannel(i+1); setMinAndMax(0, 15117); } // Kind regards Herbie ::::::::::::::::::::::::::::::::::::::::::::::::::: Am 18.06.21 um 10:06 schrieb Straatman, Kees (Dr.): > Dear Herbie, > > The below code works. > > run("Confocal Series"); > setMinAndMax(10, 123); > run("Apply LUT", "stack"); > Stack.setChannel(2); > setMinAndMax(5, 175); > run("Apply LUT", "stack"); > > Best wishes > > Kees > > > Dr Ir K.R. Straatman FRMS > > Advanced Imaging Facility > > University of Leicester > > > ________________________________ > From: Herbie <[hidden email]> > Sent: 17 June 2021 18:18 > To: [hidden email] <[hidden email]> > Subject: Re: setting contrast of a multichannel image > > Greetings Michael, > > I fear you need to loop through all n color channels. > > Regards > > Herbie > > ::::::::::::::::::::::::::::::::::::::::::::: > Am 17.06.21 um 18:56 schrieb Cammer, Michael: >> Would you please help with setting the contrast of a multichannel image and propagating to the other n channels of the image in a macro. >> >> When I click the box in the B&C window, the option to apply to the other channels is not recorded. >> >> I could write my own function to do this, but is there a way to use syntax added to setMinAndMax(0, 15117) to achieve this? >> >> Thank you! >> >> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory >> NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY 10016 >> Office: 646-501-0567 Cell: 914-309-3270 [hidden email]<mailto:[hidden email]> >> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnyulmc.org%2Fmicros&data=04%7C01%7Ckrs5%40leicester.ac.uk%7Cca1b7db5331f4387dcfa08d931b9b8b0%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637595496006235688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=RoFEEVk%2FYEXCCznnypYximRLBb3uP0Eqmr%2FRh4LaDk8%3D&reserved=0 https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmicroscopynotes.com%2F&data=04%7C01%7Ckrs5%40leicester.ac.uk%7Cca1b7db5331f4387dcfa08d931b9b8b0%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637595496006235688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=570DiBLzrU7yEydpoy0iHzoJsG4pb%2FCtqOY4bdD8pYI%3D&reserved=0 >> Acknowledgement in your publications and presentations of work performed in the Microscopy Core plays a vital role in securing support and the funding necessary to maintain and operate this valuable research resource. For publications that were made possible by work performed in the core, please use the acknowledgement statement "We thank the NYU Langone Microscopy Core for experimental and technical support" and include required grant numbers as listed here https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmicroscopynotes.com%2Filabnyu%2Facknowledgements2017.pdf&data=04%7C01%7Ckrs5%40leicester.ac.uk%7Cca1b7db5331f4387dcfa08d931b9b8b0%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637595496006235688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=hNPkACrIZpuNjUAZkRqkSAa6VvF%2FCATaEhZfIaJlJyk%3D&reserved=0 >> Please also consider staff for co-authorship if they played a key role in the study. >> >> >> >> -- >> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=04%7C01%7Ckrs5%40leicester.ac.uk%7Cca1b7db5331f4387dcfa08d931b9b8b0%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637595496006235688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=c3UE1x9f7dS9vU1kqlFnD0pRNdtT52888UNa9Z167NY%3D&reserved=0 >> > > -- > ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=04%7C01%7Ckrs5%40leicester.ac.uk%7Cca1b7db5331f4387dcfa08d931b9b8b0%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C1%7C637595496006235688%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=c3UE1x9f7dS9vU1kqlFnD0pRNdtT52888UNa9Z167NY%3D&reserved=0 > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |