Analyse several images and save data to file

Share your programming ideas for various measurement and analysis tasks here
Post Reply
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Analyse several images and save data to file

Post by user-4 »

Code: Select all

#######################################################
## M E A S U R E M E N T   A N D   A N A L Y S I S
##
## Macro name: Analyze several images and save data to file
## Required files: round1.czi, round2.czi, round.czias
##
## LOAD IMAGE ANALYSIS SETTING, LOAD IMAGE,
## Analyze THE IMAGE WITH DIRECT DATA STORAGE BUT WITHOUT DATA EMBEDDING,
## SHOW CUMULATED DATA LISTS
## 
#######################################################
##
##
## Remove all open documents
Zen.Application.Documents.RemoveAll()
##
## Load measurement program
ias=ZenImageAnalysisSetting()
ias.Load("round.czias")
##
## activate IO library
from System.IO import File, Directory, FileInfo
##
## define path and file type
path = "C:\\OAD\\Input\\ZVI Images\\Round"
files = Directory.GetFiles(path,"*zvi")
##
## loop over all ZVI images in the folder
for i in range(0,files.Length):
    file = files[i]
    fileInfo = FileInfo(file)
    PathAndFile = path + "\\" + fileInfo.Name
    image = Zen.Application.LoadImage(PathAndFile,False)
    # The following command has to be activated, if each image should be displayed
    Zen.Application.Documents.Add(image)
    ## Measure automatically (Run Silent Large File) without data embedding
    ## Overwrite existing datalist for first image
    if i == 0:
        Zen.Analyzing.AnalyzeToFile(image,ias,'C:\\OAD\\Output\\CSV Tables','round',False)
    else:
        Zen.Analyzing.AnalyzeToFile(image,ias,'C:\\OAD\\Output\\CSV Tables','round',True)
    ## Close image (otherwise it cannot be deleted in explorer)
    image.Close()
##
## show cumulated region data list
fldTable = Zen.Application.LoadTable('C:\\OAD\\Output\\CSV Tables\\roundClasses1.csv')
Zen.Application.Documents.Add(fldTable)
##
## show cumulated regions data list
regTable = Zen.Application.LoadTable('C:\\OAD\\Output\\CSV Tables\\roundClass1.csv')
Zen.Application.Documents.Add(regTable)
##
#######################################################
Julio Rigty
Posts: 1
Joined: Tue Aug 01, 2023 10:54 am

Re: Analyse several images and save data to file

Post by Julio Rigty »

Enjoyed reading the article above, really explains everything in detail, and the article is very interesting and effective. Thank you and good luck with the upcoming articles. TalkToGiant
David Joske
Posts: 1
Joined: Wed Aug 16, 2023 11:55 am

Re: Analyse several images and save data to file

Post by David Joske »

Julio Rigty wrote: Tue Aug 01, 2023 11:00 am Enjoyed reading the article above, really explains everything in detail, and the article is very interesting and effective. Thank you and good luck with the upcoming articles. https://gamblorium.com/at/
That's helped me a lot to solve this issue
Daisy Jones
Posts: 1
Joined: Tue Mar 26, 2024 5:11 pm

Re: Analyse several images and save data to file

Post by Daisy Jones »

I've started dabbling with picture analysis recently, and I must say that it's intriguing! One of the ways I've been employing is analyzing many photographs and saving the results to a file for later analysis. I'm looking for a reputable Comic Writing Company firm to assist bring my concepts to reality. I have some excellent concepts, but I need professional writers who understand the complexities of comic narrative to truly make them sparkle.


Visit Our Website: https://ebookwritingservice.us.com/comic-book-writing-services/
Post Reply