Transfer or copy measured objects found within an image to another image (without feature manager)
There are two images loaded in Image Pro. In the first image a huge amount of objects found within (~1000000 objects). The measurements should now transfered to the second image to read out the intensity and so on. The feature manager does not show it when I try to add the measurements to the feature manager. I think because of the huge amount of objects. The only way I can do it now is to save it in a measurement results file and reload it to the second image.
Thanks in advance.
Is there a way to solve this programmatically?
Thanks in advance.
fsup
0
Best Answer
-
Hi fsub,
Transferring measurements from one image to another using IQM file is an acceptable solution, it also can be automated (just activate macro recording to see the commands).
Another option would be to use lower level code and transfer data between documents like in the macro below (Activate source image with measurements and run the macro, when prompted, click on destination image and measurements will be transferred).Public Sub CopyMeasurementData Dim srcDoc As IMcDocument=ThisApplication.ActiveDocument Dim md As McMMData=srcDoc.Data.MeasurementsData If md.Count=0 Then MsgBox("ActiveImage doesn't have measurements") Exit Sub End If Dim dstDoc As IMcDocument With Automate.ScriptingCommands.ClickOnWorkspace(Nothing) .Prompt = "Please click on destination document." .SelectDocuments=True .Run(Nothing, dstDoc, Nothing) End With Dim md2 As McMMData=dstDoc.Data.MeasurementsData md2.AddFeaturesAsManualMeasurements(md.GetMcFeatures()(0)) End Sub
Yuri0
Answers
-
2019-08-26-091213FSUP --I do not know whether transferring that number of OBJECTS from one image to another in IMAGE-PRO is practical but . . .It may be easier to do the IMAGE ARITHMETIC to transfer the IMAGE DATA from the IMAGE you want to analyze into the IMAGE where the OBJECTS ARE.
- IMAGE AA = IMAGE WITH OBJECTS
- IMAGE BB = IMAGE FOR MEASUREMENT
- IMAGE AA * 0
- IMAGE AA + IMAGE BB
- MEASURE INTENSITIES in AA with OBJECTS from AA and PIXEL DATA from BB
I hope this information is helpful.-- Matt
0 -
Hi Matt,
thank you. I'll try your solution and give my feedback.
0 -
Hi Yuri,thats exactly what I am looking for.Thank youfsup0
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