image class
Hi Guys how can I get the number of open images and their class (rgb, gray8 ect)? thank you Maurizio
0
Answers
-
Hi Maurizio,All visible Images are in ThisApplication.Images collection, the type of image is defined in McImage.Type (McImageType class). Here is a test macro that prints types of all opened images:
Imports MediaCy.IQL.Engine
...
Public Sub ImagesReport() ThisApplication.Output.Show Dim n As Integer=ThisApplication.Images.Count ThisApplication.Output.PrintMessage("Number of opened images = " & n.ToString) For Each im As McImage In ThisApplication.Images Dim s As String=im.DisplayName Dim imType As McImageType=im.Type With imType s+=", Quick Type = " & im.QuickType.ToString() s+=", Number of Channels = " & .NumberOfChannels.ToString() s+=", Bits per channel = " & .BitsPerChannel.ToString() End With ThisApplication.Output.PrintMessage(s) Next End Sub
Regards,
Yuri
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