Results 1 to 4 of 4

Thread: Change threshold value in image analysing setting file

  1. #1
    Member
    Join Date
    Dec 2017
    Posts
    65

    Change threshold value in image analysing setting file

    Hi,

    I have been trying to change the threshold value in an image analysisng setting file by loading an existing file into ias and using it in Zen.Analyzing.AnalysingInteractive(image, ias). The setting is set so that the only interactive step is the segmentation. But it seems as the value can not be saved afterwards when using ias.save. When I use ias next time it will still be the "old" threshold value and not the new one (I have tried both analyzeinteractive and just analyze). If I take an existing ias where the only interactive step is the segmentaion and load it into the wizard I still have to through all seven steps, but the threshold seems to be saved after the wizard is used. The idea is that the user with help of an existing image analysis setting file do the threshold initially once but that the following automatic acquiring of images and analyzing rely on this threshold value.

    Kind regards
    Fredrik Olsson

  2. #2
    CZ Administrators Carl Zeiss Microscopy 3's Avatar
    Join Date
    Jan 2013
    Posts
    333
    Dear Fredrik Olsson,

    in the ‘Interactive Analysis’ the value of a setting (ias) cannot be saved, neither manually nor programmatically.

    Your use case (the user does the threshold initially once with the help of an existing image analysis setting file but the following automatic acquiring of images and analyzing rely on this threshold value) has been discussed at Zeiss and it will be on the ‘ToDo-List’ of a future release.


    ‘If I take an existing ias where the only interactive step is the segmentation and load it into the wizard I still have to through all seven steps.’

    You can decide (checkbox) for each step whether it will show up as an interactive step or not. This can be set when configuring the analysis setting.


    Thanks for your contribution!
    Last edited by Carl Zeiss Microscopy 3; 04-17-2018 at 11:03 AM.

  3. #3
    Member
    Join Date
    Dec 2017
    Posts
    65
    Hi,

    I thought it was possible to modify settings and afterwards save them with ias.save but maybe there was only an exception with threshold values. In the thread "Save object stage positions in text file" you have in the code example the following:

    ## ANALYSIS
    ## Load analysis setting
    ias = ZenImageAnalysisSetting()
    ias.Load('Move measured object to image center')
    ## Analyze the image
    Zen.Application.Pause("Do setup for segmentation")
    Zen.Analyzing.AnalyzeInteractive(image,ias)
    ## Save modified image analysis setting
    ias.Save('Move measured object to image center')


    So I based my idea on this code example but with aim of modifyng the threshold. I will make some changes in my code and use your excellent example of the external mask instead - that was a very valuable example!

    Kind regards
    Fredrik Olsson

  4. #4
    CZ Administrators Carl Zeiss Microscopy 3's Avatar
    Join Date
    Jan 2013
    Posts
    333
    Hello Fredrik Olsson,

    you are right. ias.

    ias.Save('Move measured object to image center')

    will not work so I modified the corresponding macro.

    ias.Save() just works if you really use the functions of the ias-class.

    Thank you for your contribution!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •