UPDATE FOR FEATURES IN DATA TABLE . . .
2022-11-02-171736
All --
I have a routine named
Update_Results
The CODE for that routine is below.
This ROUTINE works properly if the BLOB / CELLS are found via a COUNT.
If the BLOBS / CELLS are edited (MANUALLY ADDED or MANUALLY DELETED) the ROUTINE shows the results from the COUNT rather than the results from the IMAGE.
Is there a way to get the POST EDIT "STATISTICS" on the image?
Lets say that the COUNT identified 100 BLOBS and filtered 75 so there are 25 CELLS. If the USER deletes one CELL there would be 24 CELLS. If the USER adds two CELLS with a TOOL (CIRCLE, POLYGON, ETC), there would be 26 CELLS.
Thanks.
-- Matt
PUBLIC Sub Update_Results() 'CONNECT WITH THE IMAGE DATA FOR THE ACTIVE IMAGE Dim im As McImage = _ ThisApplication.ActiveImage 'CONNECT WITH THE MEASUREMENT DATA IN THE IMAGE DATA Dim md As McMMData = _ im.MeasurementsData 'Learn the number of hulls in the ACTIVE IMAGE If md.lastcountinrange <> 0 _ Then textBox_BlobsFound.Text = _ md.LastCountTotal.ToString("0.000") textBox_BlobsFiltered.Text = _ Format(md.LastCountTotal - md.LastCountInRange,"0.000") textBox_CellsFound.Text = _ md.LastCountInRange.ToString("0.000") Else textBox_BlobsFound.Text = _ "0.000" textBox_BlobsFiltered.Text = _ "0.000" textBox_CellsFound.Text = _ "0.000" End If End Sub
0
Answers
-
Hi Matt,
You routine reports Count operation results. If you create objects differently (drawing manually or editing), you can also get the number of objects using
md.SubFeatures.Count
Regards,
Yuri0 -
2022-11-03-143218Yuri --Thank you for that information.I am working to upgrade an APP that I wrote for IP7 in 2010. I was attempting to maintain as much of the original USER INTERFACE DESIGN as possible (see below please).The VALUE of BLOBS FOUND (by COUNT) and BLOBS FILTERED (by COUNT) may be lower than an accurate VALUE of CELLS FOUND (by COUNT and MANUAL).If there is not an easy way to quantify the number of FEATURES/OBJECTS created MANUALLY then I think I will remove BLOBS FOUND and BLOBS FILTERED from the INTERFACE.Thanks again.-- MattOld IP7 APP INTERFACENew IP10 APP INTERFACE
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions