I am very new with Fiji and would welcome any input for my current problem.
I am trying to make a macro that would draw three concentric circles of defined size around given coordinates. I am working with .czi images from Zeiss confocal microscope. The input that would be different for each image/each set of concentric circles is the variable diamplaque which is the diameter of the innermost circle and the X and Y coordinates of the circle centre. After making the circles I would use them to do area analysis with Analyze particles.
My macro currently looks like this:
diamplaque = 59; //plaque diameter in pixels diam15 = (diamplaque+96); diam30 = (diamplaque+192); X = 46.851 //these are scaled coordinates Y = 217.213 //these are scaled coordinates toUnscaled(X, Y); makeOval(X-(diamplaque/2), Y-(diamplaque/2), diamplaque, diamplaque); roiManager("Add"); Overlay.show; makeOval(X-(diam15/2), Y-(diam15/2), diam15, diam15); roiManager("Add"); Overlay.show; makeOval(X-(diam30/2), Y-(diam30/2), diam30, diam30); roiManager("Add"); Overlay.show;
The problem I am encountering is that this macro will keep on running(?) and makes these circles on all the images I open after running this macro.
I have noticed that if the macro contains only one makeOval command, it works as I would expect and makes the oval on the active image only (not on the other images that are open at the same time, nor images opened afterwards). With multiple makeOval commands it keeps on making the ovals on all images that are open or are opened thereafter. Any ideas how to fix this or make the macro in a different way?