How can I save a set of Tracks generated on MatLab as a set of tif files (to be able to analyze on ImageJ for Tracking on TrackMate)

1 view (last 30 days)
I use the below Matlab code to generate tracks:-
SPACE_UNITS = 'µm';
TIME_UNITS = 's';
N_PARTICLES = 10;
N_TIME_STEPS = 100;
N_DIM = 2; % 2D
% Typical values taken from studies of proteins diffusing in membranes:
% Diffusion coefficient
D = 1e-3; % µm^2/s
% Time step between acquisition; fast acquisition!
dT = 0.05; % s,
% Area size, just used to disperse particles in 2D. Has no impact on
% analysis.
SIZE = 2; % µm
k = sqrt(2 * D * dT);
tracks = cell(N_PARTICLES, 1);
for i = 1 : N_PARTICLES
% Time
time = (0 : N_TIME_STEPS-1)' * dT;
% Initial position
X0 = SIZE .* rand(1, N_DIM);
% Integrate uncorrelated displacement
dX = k * randn(N_TIME_STEPS, N_DIM);
dX(1, :) = X0;
X = cumsum(dX, 1);
% Store
tracks{i} = [time X];
end
clear i X dX time X0
I would like to take this track as an output in the form of a stack of tif files, so I can use it for Single Particle Tracking on TrackMate (ImageJ).
Would be great if some one could point me in the right direction.
Thanks!

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!