Skip to content

thanujadax/gpthickness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme.txt: sectionThickness

Dependencies

GPML library 'common' directory with shared custom MATLAB routines

Usage

Section thickness estimation

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

Description

The script

  1. Generates the distance-similarity matrices for individual images
  2. Learns non-linear regression models (gaussian process) based on the distance-similarity matrices
  3. Predicts thickness using the gaussian process models

The above steps can also be done using separate scripts as described below:

First generate the .mat files containing the image similarity values

matFiles are generated by running: runAllCalibrationMethodsOnVolume... (inputImageStackFileName,outputSavePath,params)

Create GP model from these similarity matrices

script_main_createGPmodelForVolume() set matFilePath, outputSavePath, fileStr, zDirection and calibrationMethods inside the script

Predict thickness for new tiff stack

mainPredictThicknessOfVolumeGP(inputImageStackFileNAme,outputSavePath,gpModelPath) also have to specify calibration method [1,6] as described in the comments section

Coefficient of stretching (compression) estimation

For a given tif stack, in order to estimate the coefficient of stretching (along Y rel to X)

  1. Create shifted versions of each image using script_createXYshiftedStacks.m and save these shifted versions in one directory (automatically done by the script)
  2. Use calculateCompression.m with the above directory as the input. GPmodels created as saved for thickness estimates should also be given as an input.

Calculate coefficient of stretching for a range of orientations

script_compressEstimate_thetaAll.m

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published