Home Image-Pro General Discussions

COMPOSITE (USER) MEASUREMENT . . .

All --

At a training session or during a webinar, it seems that mention of made of a way to create a COMPOSITE (USER) MEASUREMENT from existing PREMIER MEASUREMENTS.

An example of this would be

     (NEW) AVERAGE HOLE AREA = (EXISTING) REGION HOLE AREA / (EXISTING) REGION HOLES, NUMBER OF

After investigating within PREMIER and its documentation, I do not see a path to this feature.

If this feature exists, how is it accessed?

Thanks.

-- Matt


Best Answers

  • Answer ✓
    Hi Matt,

    User-defined measurements can be implemented using custom projects. There are 2 sample projects installed in C:\Users\Public\Documents\Image-Pro Premier 64-bit (Shared)\Scripts folder. UserMeasuremetns and UserMeasurements2. (the first is a Compiled version and the second is Interpreted).

    After you load one of these projects the new user-defined measurements will automatically appear in the measurements list for Count/Size (Circularity, BoundingRectangle, Coordinates,...), so if you execute count on any image they appear in the data table and can be used in Data Collector as any other native measurement. 

    You can check the code and comments and implement any of your own measurements following the pattern. The formula to compute the measurement is defined in IMcUserMeasure_ComputeValue function of the measure class, the function returns an array of measurement values. Other methods, as UserAttributes, UserDisplayName, UserDescription provide optional properties for the measurement, such as icon, description, display name etc.


    Regards,

    Yuri
  • Answer ✓
    If you want to have user-defined measurements in Data Collector, then yes, you can define the formula right in the dialog. You can create user-defined measurement clicking the New button in the Types dialog of Data Collector, then write a formula using available measurements and arithmetical operators.

    The macro projects mentioned above are the samples to create user-defined measurements directly in Count/Size.

Answers

  • Yuri --

    Thank you for the information.

    Is there a way to do this from the USER INTERFACE "on the fly" or does it have to be done via CODE?

    Perhaps what I'm remembering is the USER DEFINED MEASUREMENT as shown as part of the DATA COLLECTOR in the IPP9 MANUAL on page 8-64.

    Thanks again.

    -- Matt
  • Yuri --

    Thank you for the additional information.

    I'll work with the IPP9 customer to determine the best path for them.

    Thanks again.

    -- Matt
Sign In or Register to comment.