Trajectory and Circle display on a image using Macro(Any advice is welcome)

Coordinate and size of my particle are being changed over frames. I have its coordinates and size information at each frame in a txt file. I want to display this trajectory and size over the frames on the image.
At the first frame, it should display only a circle of custom size at the coordinate.
From the second frame, it should be linked to each other from the first frame and display the line with a new circle corresponding to the next custom size.

I’ve tried some ways.

  1. Loaded XY coordinates to image => This links all points at one frame, even from the last point to the first point.
  2. Trackmate => it doesn’t allow me to use my own data.
  3. mTrackJ=>It allows me to display my own trajectory on the image, but I cannot save the trajectory on it(Anyone knows how to draw&save it on the image? When I save it using Movie button, it became RGB(very bad resolution).). and it doesn’t have the function that displays the different size of circles over the frame using custom data.

I concluded there is no way to accomplish my requirements, I decided to write Macro. Could you give any advice about that, please? I attached the data(frame/x/y/particle_size(pixel)) and 10 frames image.

pathfile=File.openDialog("Choose the file to Open:"); 
filestring=File.openAsString(pathfile); 
rows=split(filestring, "\n"); 
f=newArray(rows.length);
x=newArray(rows.length); 
y=newArray(rows.length);
s=newArray(rows.length) 
for(i=0; i<rows.length; i++){ 
columns=split(rows[i],"\t"); 
f[i]=parseInt(columns[0]);
x[i]=parseInt(columns[1]);
y[i]=parseInt(columns[2]);
s[i]=parseInt(columns[3]);
} 

data.txt (236 Bytes)
Substack(1-10).tif (52.2 KB)