Activate programmaticaly a specific channel/frame on an imageset
A customized automation opens an imageset (.czi image) with 4 channels. After that, the user should deline some regions on the third channel every time. Finally the automation move to the next image.
I tried to record a macro, but I did not find the right mechanism to control the behavior. How can I solve this?
Version: Image-Pro Premier 9.3.3.
Thanks in advance.
I tried to record a macro, but I did not find the right mechanism to control the behavior. How can I solve this?
Version: Image-Pro Premier 9.3.3.
Thanks in advance.
0
Answers
-
Hi fsup,
You should be able to record such macro just by switching off color composite mode and selecting the channel.
Here how it looks in my recording, the macro selects the channel 2 image (0-based):Public Function ActivateChannel2() As SimpleScript ActivateChannel2 = New SimpleScript Dim window1 With Application.WindowCommands.Active(ActivateChannel2) .Run(window1) End With With View.ImageSetViewCommands.Options(ActivateChannel2) .ColorCompositeView = False .ActiveRegionInUse = MediaCy.IQL.Sets.mcImageSetActivePortionTypes.mcisaptCurrentLocation .ViewLocation = New McImageSetLocations .ViewLocation.Add(mcImageSetDimensions.mcisdChannel, 2) .Run(window1) End With End Function
You can modify it to select any channel.
Yuri0 -
Hi Yuri,thank you for your prompt reply.The solution works when I extract the Very Large Image (with the extract tool) in a previous step. After that I can activate the channel via macro. But because of the big sized images it takes time.
Is it possible to do this without any extraction on the original czi image?Thanksfsup
0 -
fsup,
Do you need the whole image or just some area of it? If you need an area, I recommend to put a ROI around that area (on the original VLI image) and Extract that area (at the desired resolution). It will be a fast operation, which is also recordable. Then you can use my macro to go to the required channel on the extracted image set.
Yuri0 -
Hi Yuri,For further steps I need the whole image.Thanksfsup0
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