Time concatenation of 200 files

Discuss questions and projects related to processing of imaging data here
Post Reply
Wojciech Jesionek
Posts: 1
Joined: Tue May 31, 2022 9:20 am

Time concatenation of 200 files

Post by Wojciech Jesionek »

Hello,
I have time-lapse images with 2 channels that I want to concatenate (every time-point is a separate file). Is there a way how to do that with a macro? Or any other way? Because the time concatenation method on zen blue can concatenate only 2 files but I have more than 200.
I'd appreciate your help or any suggestions.
Thank you!
CarlZeissMicroscopy3
Posts: 180
Joined: Wed May 20, 2020 10:10 am

Re: Time concatenation of 200 files

Post by CarlZeissMicroscopy3 »

Is there a way how to do that with a macro?
Hello Wojciech Jesionek,

yes, this macro shows how it can be done:

Code: Select all

from System.IO import File, Directory, FileInfo

path = 'C:\\Users\\....\\'

files = Directory.GetFiles(path,"*.czi")

fileList = []
for file in files:
    fileList.append(file)
fileList.sort()

imageMain = None

for file in fileList:
    print file
    if imageMain == None:
        imageMain = ZenImage()
        imageMain.Load(file)
    else:
        imageAdd = ZenImage()
        imageAdd.Load(file)
        imageMain = Zen.Processing.TimeSeries.TimeConcat(imageMain, imageAdd)
 
#Only needed if image is large       
#Zen.Processing.Utilities.GenerateImagePyramid(imageMain, ZenBackgroundMode.Auto)


Zen.Application.Documents.Add(imageMain)
imageMain.Save(path + 'TimeConcat.czi')
servis shoes
Posts: 5
Joined: Wed Sep 27, 2023 8:05 am

Re: Time concatenation of 200 files

Post by servis shoes »

Shop the latest collection of Women Formal Shoes from Servis Shoes. Our range includes elegant and sophisticated styles for any formal occasion. Find the perfect pair to complement your outfit and step out in style and comfort.
Maria Myers
Posts: 1
Joined: Fri Nov 10, 2023 4:03 am

Re: Time concatenation of 200 files

Post by Maria Myers »

With a commitment to offering a seamless and convenient experience.
heels.pk shopping
Posts: 1
Joined: Thu Mar 28, 2024 9:02 am

Re: Time concatenation of 200 files

Post by heels.pk shopping »

Nice info! It's always enlightening to dive into discussions like these and learn from different perspectives. For those who love fashion and are on the lookout for something special to complement their wardrobe, heels.pk offers a beautiful selection of women's heels. It's worth exploring for anyone passionate about elevating their style!
Post Reply