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

Copy measurement table results in another variable

Hello,

is it possible to store the measurement results in a variable? I use following code to get the data:

Dim dataImgA As MediaCy.Addins.Measurements.McMMData = Nothing        

With MediaCy.Automation.measure.MeasurementsCommands.GetData(Nothing) .Run(imgA, dataImgA) End With

I want to copy var "dataImgA" to "tmpDataImgA". But there is no ".Duplicate()" or ".Copy()" method available.
How can I solve this?

Thank you in advance
fsup


Comments

  • Hello fsup,

    The class McMMData contains multiple functions and properties that exposes measurements on the image. It's not a data table.

    How do you want to use this data? There could be different solutions, depending on what you want to do with the data. (it's possible to copy measurements to another image, get all results as statistics and so on). Let us know.

    Yuri
  • Hi Yuri

    I need this for further analysis. In order to record the measurement results I would like to save the data table as an iqm file.

    The macro prompts the user to draw a polyline and then processes a list of various functions (filter, lowpass, erode, image calculation, etc.). The polyline is drawn in to determine the length of an object on the image. The measurement result table should be saved in a variable. The polyline is then deleted again by the macro. The list of functions is then processed by the macro. If the macro did not return an error at the end, the result should be saved as iqm.

    Thanks
    fsup

  • Hi fsup,

    You can save iqm file and also save results data table to a TXT or XLS file (just record a macro to see the commands).

    Though I would recommend using Data Collector for that purpose: you can collect data from your polylines to Data Collector (from individual lines or statistics per image), delete, draw new, collect again (data collection can be a part of the macro) and all data will be preserved in data collector.

    Yuri

  • Hi Yuri,

    Thank you for your advice. That sounds good.

    fsup
Sign In or Register to comment.