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