Hi,
I would need a macro that merges all measurements results from several images in one final table.
All images are previously acquired, annotated with a length measurement tool and saved as .czi in a folder.
The macro should extract all measurement values of each image in this folder and append them in one table.
Could you help me please?
Thanks.
append measurements results in a table
-
- Posts: 23
- Joined: Fri May 29, 2020 1:54 pm
-
- Posts: 180
- Joined: Wed May 20, 2020 10:10 am
Re: append measurements results in a table
Hello Julien Toquant,
the zenTable object collects all measurement data from czi-files in the folder path.
I hope this is what you need.
the zenTable object collects all measurement data from czi-files in the folder path.
Code: Select all
from System.IO import File, Directory, FileInfo
path = r'C:\Users\...\Pictures\ImageWithMeasurement'
files = Directory.GetFiles(path,'*.czi')
for i in range(0,files.Length):
file = files[i]
fileInfo = FileInfo(file)
pathAndFile = path + "\\" + fileInfo.Name
image = Zen.Application.LoadImage(pathAndFile,False)
if i == 0:
zenTable = Zen.Measurement.MeasureToTable(image)
else:
zenTable = Zen.Measurement.MeasureToTable(image, zenTable, True)
image.Close()
Zen.Application.Pause('Number of Rows: ' + str(zenTable.RowCount))
-
- Posts: 23
- Joined: Fri May 29, 2020 1:54 pm