Home Image-Pro Automation (Macros, Apps, Reports)
Options

Restriction to 10000 objects/measurement/ROI file

Hi all,

It took me two days to find out that my macro was o.k. when I measured a bunch of images, whereas some were measured, some not.

With repetition some were then measured some still not, thus the error was irreproducible

The reason was incredible and is quickly explained:  When automatically storing more than 10000 objects to an roi file, it is handled as error and also all other vars filled in the macro process are considered nothing.

This is a quite annoying step back, since even IPP 4 was able to store 32000 objects in scl files (and exceeding did also not produce errors). From a very expensive  64bit version I'd rather expect it to be able to store more....

Is this going to be resolved? Actually most of my measurement will exceed 10000 objects (full brain imaging, and I already use size restriction, 8-connect..etc...) and I promise to produce comprehensible measurements. This includes that I can save the measured objects to a file, from which I can reload them.

Many thanks

Daniel

Best Answer

  • Options
    edited January 2016 Answer ✓
    Hi Daniel,

    What is the problem exactly and how we can reproduce it? Premier does have 10000 individual objects display limit (default), which is used to make object display faster, but it's not the limit of the total objects number (the total object count is unlimited (only memory limits)).
    You can change this limit on the Application tab of the options (Individual Object display limit).

    Please check if it will fix your macro.

    Regards,

    Yuri

Answers

  • Options

    Hi Yuri,


    You are right the general settings are the same. But that's not the problem.

    I used a simple macro that adds the measurement to the ROI and then saves the ROI with filename.roi. If the number of counted objects exceeds 10000 then it produces an internal error and the macro stops (in a batch process) and no other lines are executed.

    And there is another senseless restriction:

    I need to use size restriction with a minimum but high maximum. The Region:area range is restricted to 10 mio. pixels (not editable). This is not enough for my measurements and really needs to be changed. ( I also do not see any reason to have such restriction, for sure it should not be the variable range, should it? Even then we should be able to go for 99999999....)


  • Options

    P.s.: By the way increasing the number of objects to be displayed in the general settings really solves the problem of storable objects in the ROI file.

    Best

    Dan

  • Options
    Ok, it's good to know that it solves your problem, so you can use larger number (e.g. 1000000) and all objects can be saved into a file. Just note that it may slow down the display of all of the objects on the image.

    Yuri

  • Options

    P.P.s: and the problem with the size restriction can be solved by code thus it just seems to be a problem of the GUI.

    With Measure.MeasurementsCommands.Options(Measure2)
                .Segmentation.FilterRanges = New System.Collections.Generic.List(Of MeasFilterEntry)
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry("mRgnPerAreaPcnt",0R,100R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnDensity,-1000000000R,1000000000R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnIntegratedOD,-1000000000R,1000000000R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnStdDevIntensity,0R,1000000000R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnMeanDiameter,0R,1000000R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.LnLength,0R,10000000R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnMeanGreen,-1000000000R,1000000000R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnMeanBlue,-1000000000R,1000000000R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnMeanRed,-1000000000R,1000000000R))
                    .Segmentation.FilterRanges.Add( New MeasFilterEntry(eMeasures.RgnArea,10R,99999999R))
                .Run(doc1)
            End With

Sign In or Register to comment.