issues with composite apply
Hi,
I'm trying to overlay a bright field (BF) and a GFP image. I'm using the composite function, add the BF image, change the color from red to brightfield, add the green image, use the BF as Background and apply. It all works fine manually when I record the macro. But when I use the code generated, the resulting image has again the Red color instead of the Gray brightfield image.
Here is the code I use.
I thought it was a time issue, so I added a wait (30 seconds) before the apply section but it is still the same.
Any Idea what is wrong ?
Thank you
I'm trying to overlay a bright field (BF) and a GFP image. I'm using the composite function, add the BF image, change the color from red to brightfield, add the green image, use the BF as Background and apply. It all works fine manually when I record the macro. But when I use the code generated, the resulting image has again the Red color instead of the Gray brightfield image.
Here is the code I use.
With Adjust.ColorCompositeCommands.[New](GFPoverlay)
.Run(doc3)
End With
With Application.DocumentCommands.Activate(GFPoverlay)
.Run(doc3, doc3)
End With
With Adjust.ColorCompositeCommands.Add(GFPoverlay)
.Run(doc3, image1)
End With
With Adjust.ImageCommands.Tint(GFPoverlay)
.DyeName = "Brightfield"
.EmissionWavelength = 550
.Color = System.Drawing.Color.FromArgb(CType(255, Byte),CType(255, Byte),CType(255, Byte))
.ApplyProperties = True
.Run(image1)
End With
With Adjust.ColorCompositeCommands.SetBackground(GFPoverlay)
.BGImage = image1
.Run(doc3)
End With
With Adjust.ColorCompositeCommands.BestFitDisplay(GFPoverlay)
.Mode = ColorComposite.BestFitDisplay.BestFitModes.BestFit
.ChannelsOption = ColorComposite.BestFitDisplay.ChannelsOptions.Extremes
.Run(doc3, image1)
End With
With Adjust.ColorCompositeCommands.Add(GFPoverlay)
.Run(doc3, image2)
End With
With Adjust.ColorCompositeCommands.Apply(GFPoverlay)
.Visible = True
.Cleanup = True
.Result = ColorComposite.ApplyResults.Image
.Dimension = ColorComposite.SequenceDimensions.Auto
.Run(doc3,doc4)
End With
I thought it was a time issue, so I added a wait (30 seconds) before the apply section but it is still the same.
Any Idea what is wrong ?
Thank you
0
Answers
-
Hi jpclamme,
Thank you for reporting the issue. I'll take a look. The current workaround is to set "Brightfield" before adding image to the Color Composite view. If Tint is set then CC will use it.
Thanks,
Nikita.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