-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunExample2.m
More file actions
executable file
·71 lines (49 loc) · 1.81 KB
/
RunExample2.m
File metadata and controls
executable file
·71 lines (49 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
%% 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 files.
root_folder = 'samples';
% The segmentation results. Here we use the results from Y. Bellaiche lab
% analysis software. The results must contain a CELLS, FRAME, VERTICES and
% SIDES structures.
segmentation_filename = 'AdultZebrafishBrainSeg.mat';
% The tissue surface mesh. It must be a mesh mapping the tissue surface,
% openedd at the tissue borders.
mesh_filename = 'AdultZebrafishBrainSimplifiedMesh.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
scale_bar_length = 50; % um.
fprintf( 'Plotting the cell sizes.\n' )
dpr.figure_cell_sizes( scale_bar_length );
fprintf( 'Plotting the tissue orientation.\n' )
dpr.figure_tissue_orientation( scale_bar_length );
fprintf( 'Plotting the tissue local curvature.\n' )
dpr.figure_curvatures( scale_bar_length );
fprintf( 'Plotting the cell elongation and direction.\n' )
dpr.figure_cell_elongation( scale_bar_length );
fprintf( 'Plotting the impact of projection distorsion.\n' )
dpr.figure_distorsions( scale_bar_length );
fprintf( 'Plotting the topology figure.\n' )
dpr.figure_topology( scale_bar_length );
fprintf( 'Finished.\n' )