A way to update PREMIER IMAGE WINDOW . . .
All --
I have created CHECKBOXES within an APPLICATION to control the ROI OPTIONS of
SHOWMASK
and
XORROIs
within PREMIER 9.1.4.
The code supporting these two CHECKBOXES is below.
When the SHOWMASK feature is ON then:
** Changing the XORROIs from OFF to ON via checkBox_ROIOptionXOR results in the proper ROI MASK being displayed
** Changing the XORROIs from ON to OFF via checkBox_ROIOptionXOR does not update the ROI MASK so the MASK is wrong
This is not remedied by turning the MASK OFF and ON again.
This behavior does not happen when XORROIs is turned from OFF to ON to OFF via the PREMIER (9.1.4) UI.
Is there a way to work around this issue?
Thanks.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
I have created CHECKBOXES within an APPLICATION to control the ROI OPTIONS of
SHOWMASK
and
XORROIs
within PREMIER 9.1.4.
The code supporting these two CHECKBOXES is below.
When the SHOWMASK feature is ON then:
** Changing the XORROIs from OFF to ON via checkBox_ROIOptionXOR results in the proper ROI MASK being displayed
** Changing the XORROIs from ON to OFF via checkBox_ROIOptionXOR does not update the ROI MASK so the MASK is wrong
This is not remedied by turning the MASK OFF and ON again.
This behavior does not happen when XORROIs is turned from OFF to ON to OFF via the PREMIER (9.1.4) UI.
Is there a way to work around this issue?
Thanks.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Private Sub checkBox_ROIMask_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles checkBox_ROIMask.CheckedChanged 'If the option is ON If ( checkBox_ROIMask.Checked ) _ Then With Select.RoiCommands.ShowMask(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked .Overlay = Overlays.OverlayType.ROIOverlay .Run(ThisApplication.ActiveDocument) End With Else With Select.RoiCommands.ShowMask(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Unchecked .Overlay = Overlays.OverlayType.ROIOverlay .Run(ThisApplication.ActiveDocument) End With End If End Sub Private Sub checkBox_ROIOptionXOR_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles checkBox_ROIOptionXOR.CheckedChanged 'If the option is ON If ( checkBox_ROIMask.Checked ) _ Then With Select.RoiCommands.XORROIs(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked .Run(ThisApplication.ActiveDocument) End With Else With Select.RoiCommands.XORROIs(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Unchecked .Run(ThisApplication.ActiveDocument) End With End If End Sub
0
Best Answer
-
Hi Matt,
I've tested Mask/XOR/Invert commands and they work as expected (mask updated automatically):XOR On
XOR Off
Please, show your image.
Thanks,
Nikita.0
Answers
-
Nikita --
Thank you for your response.
After reading your message I looked closely at the code and found a programming error on my part was causing this issue.
I found that my XORROI OPTION ROUTINE was checking the wrong CHECKBOX. ChangingPrivate Sub checkBox_ROIOptionXOR_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles checkBox_ROIOptionXOR.CheckedChanged 'If the option is ON If ( checkBox_ROIMask.Checked ) _
toPrivate Sub checkBox_ROIOptionXOR_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles checkBox_ROIOptionXOR.CheckedChanged 'If the option has been turned ON If ( checkBox_ROIOptionXOR.Checked ) _
resolved the (self generated) issue.
The working versions of the routines are below.
Sorry for the false alarm and thank you for checking this for me.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-Private Sub checkBox_ROIMask_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles checkBox_ROIMask.CheckedChanged 'If the option has been turned ON If ( checkBox_ROIMask.Checked ) _ Then With Select.RoiCommands.ShowMask(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.checked .Overlay = Overlays.OverlayType.ROIOverlay .Run(ThisApplication.ActiveDocument) End With Else With Select.RoiCommands.ShowMask(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Unchecked .Overlay = Overlays.OverlayType.ROIOverlay .Run(ThisApplication.ActiveDocument) End With End If End Sub Private Sub checkBox_ROIOptionXOR_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles checkBox_ROIOptionXOR.CheckedChanged 'If the option has been turned ON If ( checkBox_ROIOptionXOR.Checked ) _ Then With Select.RoiCommands.XORROIs(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked .Run(ThisApplication.ActiveDocument) End With Else With Select.RoiCommands.XORROIs(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.UnChecked .Run(ThisApplication.ActiveDocument) End With End If End Sub
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