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
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.