Create a 4C image of 2D single channel images

Your place to discuss general handling of images and the CZI file format
Post Reply
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Create a 4C image of 2D single channel images

Post by user-4 »

Code: Select all

#######################################################
## I M A G E 
##
## Macro name: Create a 4C image of 2D single channel images  
## Required files: red.tif, green.tif, blue.tif, phaco.tif
##
## LOAD 4 SINGLE CHANNEL IMAGES, 
## CREATE A 4C MULTI CHANNEL IMAGE
## 
#######################################################
##
##
## Define variable
za = Zen.Application
##
## Remove all open documents
za.Documents.RemoveAll()
##
## Create new image
destImage = ZenImage()
##
## Load 4 single channel images
## Add images to new multichannel image
za.Pause('Add single images: red, green, blue, phaco')
for i in range(0, 4):
    sourceImage = za.LoadImage("C:\\OAD\\Input\\Single channel images\\",True)
    destImage.AddSubImage(sourceImage, 0, i, 0)    

za.Documents.Add(destImage)
##
#######################################################
Post Reply