select channels from opened image
Hi,
I recorded a macro to change display settings of a multichannel ( oib confocal) image. The variable definition in the code looks like that (includes the name of the file and the dye color).
Dim var1 = "Tumor_1_10_CHS1__Hoechst_4e91a61", image1
How can I select the channels in a more generic way from the open doc to define the variable.
Thank you
0
Answers
-
Hello,
It's hard to tell from your code snippet but it looks like this name would only be used to control the activation of one document or another, which can certainly be done more generically but we would need the rest of the recording to be able to help.
Pierre0 -
Here is the code as you can see it defines the variable based on the file and dye name. So if I load another image it does not work.
So I need the command to say var1 is doc1, channel 1
Public Function Diplay() As SimpleScript Diplay = New SimpleScript Dim doc1 Dim var1 = "Tumor_1_10_CHS1__Hoechst_562cb1", image1 Dim var2 = "Tumor_1_10_CHS2__Alexa_Fluor__55ac6a", image2 Dim var3 = "Tumor_1_10_CH3__Cy5", image3 With Application.DocumentCommands.Active(Diplay) .Run(doc1) End With With Adjust.ImageCommands.Define(Diplay) .Run(var1, image1) End With With Adjust.ColorCompositeCommands.SetDisplay(Diplay) .Brightness = 50 .Contrast = 50 .Gamma = 1R .BLevel = 150R .WLevel = 2000R .Run(doc1, image1) End With With Adjust.ImageCommands.Define(Diplay) .Run(var2, image2) End With With Adjust.ColorCompositeCommands.SetDisplay(Diplay) .Brightness = 50 .Contrast = 50 .Gamma = 1R .BLevel = 150R .WLevel = 1500R .Run(doc1, image2) End With With Adjust.ImageCommands.Define(Diplay) .Run(var3, image3) End With With Adjust.ColorCompositeCommands.SetDisplay(Diplay) .Brightness = 50 .Contrast = 50 .Gamma = 1R .BLevel = 150R .WLevel = 500R .Run(doc1, image3) End With
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions