Commit 87573e8f authored by Jean-Yves TINEVEZ's avatar Jean-Yves TINEVEZ
Browse files

Example import of the bellaiche file format + mesh.

parent 46e25fde
%% Example de-projection script, using a cell result structure and a mesh.
%% Clear all.
close all
clear
clc
%% Parameters, scripts and files location.
% Add DeProj functions to the path.
addpath('./src')
% Where are the images.
root_folder = 'samples';
% The segmentation results. Here we use the results from Y. Bellaiche lab
% analysis software. The results must contain a CELL, FRAME, VERTICES and
% SIDES structures.
segmentation_filename = 'SIA_161210_gfapnlsg_Backup_001.mat';
% The tissue surface mesh. It must be a mesh mapping the tissue surface,
% openedd at the tissue borders.
mesh_filename = 'SimplifiedMesh.ply';
% The physical unit of length must be specified (not stored elsewhere).
units = 'µm';
%% Read files.
% Segmentation results.
fprintf('Opening segmentation file: %s\n', segmentation_filename )
seg = load( fullfile( root_folder, segmentation_filename ) );
% Path to mesh file.
mesh_file_path = fullfile( root_folder, mesh_filename );
%% Create deproj instance.
dpr = deproj.from_bellaiche( ...
seg.CELLS, ...
seg.FRAME, ...
seg.SIDES, ...
seg.VERTICES, ...
mesh_file_path, ...
units );
%% Plot morphological parameters.
close all
plot_sizes( dpr );
plot_fit_plane( dpr );
plot_fit_ellipse( dpr );
plot_curvatures( dpr );
plot_distorsions( dpr );
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment