Home Image-Pro Plus Automation with Macros

Designating which data from Data Collector

(Originally posted by Nina on 7/13/2006)

I am manually collecting data from a movie of a growing axon composed of about 500 frames (Using Image-Pro Plus). I'm measuring angles, and to do this I make two lines and measure the angle between them. I've written a macro that uses the data collector to collect the angle values of all the measurements after each frame and then exports the collected data to Excel at the end. My problem is that I really just want to collect the angle values of my angle measurements, not the angle values of my lines also. Right now I have to go through and delete all the collected line angle values in Excel by hand. Is there a way to customize exactly what is collected and sent to Excel from the measurements window? Or do I now have to write another macro for Excel? Any ideas?




  • edited June 2013

    (Originally posted by YuriG on 7/14/2006)

    Hi Nina,

    You can also use Output window to collect data you need and send it to Excel.
    Here is the macro that collects Angle value, skipping angles of 2 lines:

    Sub PrintAngleValue()
    	Dim fValues(15) As Single
    	'get angle value of the 3dr feature, skipping first 2 lines
    	ret = IpMeasGet(GETFEATVALUES, 2, fValues (0))
    	'print angle value
    	ret = IpOutput(Str(fValues(-MDATA_ANGLE)) & vbCrLf)
    End Sub

    And with the following lines you can send collected values to Excel:

    'show output window
    	ret = IpOutputShow(1)
    'send it to Excel
    	ret = IpOutputSave("", S_DDE)
    'clear all
    	ret = IpOutputClear()
Sign In or Register to comment.