How do I tell McImage which is the active image to return data on?
I have three tif images loaded (Image1, Image2, Image3) and I want to get the Pixel Intensity data from each file in turn.
I have
Dim im As McImage=ThisApplication.ActiveImage
But ThisApplication.Windows(strImageID).Activate()
Where strImageID is updated for each file name does not update ActiveImage so the GetArea function does not report for each image but
0
Best Answer
-
Hi Chris,
There a re different ways to get image list, you can get it from Images, Documents, Windows. I will show you how to get it from MRU (most recently used windows):Public Sub ProcessAllImages 'go through the list of open windows in Most Recently Used order (MRU) For Each wnd As McWindow In ThisApplication.WindowsEx.MRU Dim im As McImage=TryCast(wnd.Document.Data,McImage) If im IsNot Nothing Then Debug.Print im.DisplayName ''do something with im End If Next End Sub
Regards,
Yuri0
Answers
-
Apologies the text has come up as code. Last paragraph should read ".... but reports data only on the last image I manually selected and does not increment with my For Next loop0
-
Thanks Yuri - this did the trick
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