Home Image-Pro General Discussions
Options

Multiple Threashold

Hi,
I am using the latest release of Premier 9.3

I need to set a double threashold on 8 bit GL image to detect different material phases.
First of all I created two classes in Count/Size 

Then all the options and the Types are set and saved in the option file.

I opened the Manual segmentation method finding both classes.

Objects are counted correctly.
The problem appears when the image is closed and a new one is loaded/acquired.
On Count/size the 2 classes  are still there but Manual shows only the first one (in the example only Ferrite class is present).
To get again the right setup the count/size option file must be reloaded.
it seems that the Manual method lost  the settings when the image is replaced by a new one.
I found the same problem on 9.2
waiting for your comments
ciao
Maurizio

Answers

  • Options
    edited February 2017
    Hi Maurizio,

    The thresholds are part of the options file and loaded to the active image when the options file is loaded, but they are not a part of the global options, so when new image is loaded it gets assigned default thresholds depending on Count segmentation option. 
    One way to set fixed thresholds to the new image is to load the options file, which you have mentioned. Another way is to set your thresholds as Global using the "Set Global" button in the threshold dialog:



    Then you just need to click the "Apply Global" button on the new image. Or execute corresponded macro before the count:

        Public Function ApplyGlobalThresholds() As SimpleScript
            ApplyGlobalThresholds = New SimpleScript
            Dim doc1
    
            With Application.DocumentCommands.Active(ApplyGlobalThresholds)
                .Run(doc1)
            End With
    
            With Measure.ThresholdToolCommands.ApplyGlobal(ApplyGlobalThresholds)
                .Run(doc1)
            End With
    
        End Function
    

    Yuri
Sign In or Register to comment.