String Array of Image Names
Hello
I'm writing an automation that requires subtracting several mask images generated from 1 master image. Rather than give each mask a different name which is messy and hard to keep track of I would like to create an array of McImages.
For example
Dim mask(5) As McImage
Dim x As Integer
For x = 1 to 5
With Measure.Measurements.CreateCommands.Mask(MakeMasks) .Run(ThisApplication.ActiveImage) End With
Masks(x) = "Mask" & number.ToString(x)
DapiMaskName1 = ThisApplication.ActiveImage 'Assigns the mask image name to variable so that it can be selected
Next x
Not the exact code but close. McImage doesn't seem to accept arrays of images like this, is there another way or would I have to use separate filenames for each one.
Regards
David
0
Best Answer
-
Hi David,You should assign image directly to the array element:Masks(x) = ThisApplication.ActiveImageAlso, CreateCommands.Mask has output parameter, which you can use directly:---
With Measure.Measurements.CreateCommands.Mask(CreateMasks) .Run(doc1, image1) End With Masks(x)=image1
Yuri
0
Answers
-
Thanks Yuri
Both work
Regards
David
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