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:"); 
rows=split(filestring, "\n"); 
for(i=0; i<rows.length; i++){ 

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