Batch processing - Limitations
Answers
-
Hi Matt,
When you open invisible image you get a pointer to the IMcDocument,With Measure.Measurements.OptionsCommands.Open(LoopOnHidden) .FileName = ThisApplication.Path(mcPathType.mcptConfigurationFiles) & "FD_Oprindelig.iqo" .FilterIndex = 1 .Visible = False .Run(doc1) End With
doc1 in this case. The Data property of IMcDocument returns McImage, so if you use
doc1.Data.Visible = True
it will make that invisible image visible.
Yuri
0 -
2017-08-02-160453
Yuri --
Thank you for the information.
I have poked at INVISIBLE IMAGES a bit and it seems like the COST / BENEFIT on this feature is heavy on the COST side.
If time allows, I'll return to this aspect of the program (eliminating images flashing on and off the screen) after all other aspects of the program are working properly.
Perhaps this topic is one that could be covered in a PREMIER PROGRAMMERS WEBINAR.
Thanks.
-- Matt
0 -
2019-04-16-183310All --I just attempted to use the CODE below to make an IMAGE INVISIBLE to speed up some work. My intention was to set the value to TRUE after the SLOW CODE was finished. Unfortunately it seems that this command is still closing the image rather than hiding it.Any thoughts on a resolution to this?Thanks.-- Matt
ThisApplication.ActiveImage.Visible = False
0 -
Matt,
If the image is already opened in the workspace and assigned to a document, you cannot hide it, only delete. You can set Visible=False to images that are going to be created.
So, what you can do is to create a duplicate, invisible version of the active image, do all the processing on it and only in the end show it.Public Function CountInvisible() As SimpleScript CountInvisible = New SimpleScript Dim image1 With Adjust.ImageCommands.Crop(CountInvisible) 'create invisible duplicate of the active image .Visible = False .Run(ThisApplication.ActiveImage, image1) End With 'do some processing on invisible image 'count With Measure.MeasurementsCommands.ExecuteCount(CountInvisible) .Run(image1) End With '... do more processing 'show the image in the end image1.Visible=True End Function
and lower level equivalent of that macro:Public Function CountInvisible2 Dim image1 As McImage=ThisApplication.ActiveImage.Duplicate(mcImageCreateFlags.mcicfNotVisible) With New Mediacy.Addins.Measurements.CountCommand .Run(image1) End With image1.Visible=True End Function
Yuri0 -
2019-04-17-075415Yuri --Thank you for the response.I think a variation on this would be something like
- Do processing and counting on IMAGE AA
- Save a copy of AA as TIF IMAGE BB so that BB contains the thousands of features found in AA
- Open BB as INVISIBLE and perform the graphic intensive operation on the features
- Close IMAGE AA
- Make BB VISIBLE so that the processed features from AA are now on the screen
Thanks again.-- Matt
0 - Do processing and counting on IMAGE AA
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