Readme.txt: sectionThickness
GPML library 'common' directory with shared custom MATLAB routines
main_script_thicknessPipeline_batch.m contains a script you can use to run the thickness estimation method using different image similarity measures.
The inputs are set in the top part of the script.
params.xyResolution = 5; % nm
params.maxShift = 40; % How much each training image should be shifted in pixels to learn the GP model
params.minShift = 0; % Keep it zero
params.maxNumImages = 3; % number of sections to initiate calibration.
% the calibration curve (GP) is the mean value obtained by all
% these initiations
params.plotOutput = 1; % 0 to turn off visualizations
params.suppressPlots = 1; % 0 to write output plots to files (directory name mentioned below)
params.imgStackFileExt = 'tif'; % image file type
stacksAreInSeparateSubDirs = 0; % all the stacks are in the same sub-directory
imageStackDirectory = '/path/to/directory/with/images';
matFilePath = '/path/to/save/distance/matrices';
outputSavePath = '/path/to/save/output';
gpModelSavePath = '/path/to/save/gausian/process/models/learned';
numImagesToEstimate = 10; % for each image stack
The script
- Generates the distance-similarity matrices for individual images
- Learns non-linear regression models (gaussian process) based on the distance-similarity matrices
- Predicts thickness using the gaussian process models
The above steps can also be done using separate scripts as described below:
matFiles are generated by running: runAllCalibrationMethodsOnVolume... (inputImageStackFileName,outputSavePath,params)
script_main_createGPmodelForVolume() set matFilePath, outputSavePath, fileStr, zDirection and calibrationMethods inside the script
mainPredictThicknessOfVolumeGP(inputImageStackFileNAme,outputSavePath,gpModelPath) also have to specify calibration method [1,6] as described in the comments section
For a given tif stack, in order to estimate the coefficient of stretching (along Y rel to X)
- Create shifted versions of each image using script_createXYshiftedStacks.m and save these shifted versions in one directory (automatically done by the script)
- Use calculateCompression.m with the above directory as the input. GPmodels created as saved for thickness estimates should also be given as an input.
script_compressEstimate_thetaAll.m