Setting Thresholds
I have the following code snip to set thresholds, but it always draws a graphic outline of the area inside the thresholds. I don't want this outline, how can I switch it off? I tried setting the colour to 'transparent' but it didn't do it.
' SET THRESHOLDS
With measure.ThresholdToolCommands.Thresholds(Nothing)
.AllowOverlap = False
.Interpretation = eInterpretation.Mono
.Classes = New System.Collections.Generic.List(Of SegmentationClass)
.Classes.Add(New SegmentationClass("Class 1",System.Drawing.Color.Blue,New Double(){LowerThreshold,UpperThreshold}))
.Run(ThisApplication.ActiveDocument)
End With
0
Best Answer
-
Paul,
BTW, why do you want to make segmentation outlines invisible? They are specifically shown, so the user can have visual indication of what have been measured. If you don't want to show it, you can just delete all segmented objects in the end of the macro . (or do all the processing and measurements on hidden images).
Yuri
0
Answers
If I understand correctly you just want to set threshold for the Count operation without showing the threshold overlay, is it right?
If yes, there is a way to do that. Threshold overlay is shown only when Threshold Tool panel is visible. Just make sure that the threshold tool panel is not visible: either don't show it or, to be sure, hide it before applying the threshold:
With Measure.ThresholdTool.Gadgets.Histogram(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Unchecked .Run() End With
Let me know if that's what you need.Yuri
Paul --
There is another PREMIER FEATURE that may help you MANUALLY or through CODE.
The SHOW THRESHOLD OVERLAY OPTION may control the display in the manner you desire.
Below is a GRAPHIC that shows the CONTROL and its effect on an image.
Below that is CODE that shows how to access this CONTROL from CODE.
I hope this information is helpful.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
In the image you can also see the tools on my Threshold tool toolbar. I don't see the 'show' button that Matt shows.
The red line doesn't look like threshold overlay, but rather it's an object outline, which is shown after the Count. Is it correct?
If yes, then you can change the thickness of the line in the Measurement Options panel (Outlines group, Width). You can also change it to Filled and set transparency.
Let me know if we are talking about the same thing.
Yuri
You can set the style to Filled and set Opacity to 0:
Another way is to switch off Measurements overlay:
Yuri
Yuri