Morphology of cell nuclei

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

Morphology of cell nuclei

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: morphology of cell nuclei
## Required files: 018 - morphology of cell nuclei.zvi, Morphology of cell nuclei.czias
##
## LOAD IMAGE, MEASURE GEOMETRICAL PARAMETERS OF NUCLEI,
## SAVE IMAGE, EXTRACT AND SAVE DATALIST
## 
#######################################################
##
##
## Remove all open images
Zen.Application.Documents.RemoveAll()
##
## Load the image automatically (example image of DVD 36)
## Display the image
image = Zen.Application.LoadImage ('C:\\OAD\\Input\\ZVI Images\\018 - morphology of nuclei.zvi')
Zen.Application.Documents.Add(image)
## Set channel color for DAPI
image.SetChannelColor(0,ZenColors.Blue)
##
## Load measurement program
## Measure automatically (Run Silent)
## Show results in Analysis view
ias=ZenImageAnalysisSetting()
ias.Load("Morphology of cell nuclei.czias")
Zen.Analyzing.Analyze(image,ias)
##
## Create data list with results
regTable = Zen.Analyzing.CreateRegionTable(image)
Zen.Application.Documents.Add(regTable)
##
## Save data list automatically
regTableName = regTable.Name
regTable.Save("C:\\OAD\\Output\\CSV Tables\\" + regTable.Name + ".csv")
##
## Save measured image automatically
fileNameWE = image.Name.Substring(0,image.Name.Length-4)
newFileName = fileNameWE + '.czi'
imageName = "C:\\OAD\\Output\\CZI Images\\" + newFileName
image.Save(imageName)
##
#######################################################
Post Reply