Login  Register

macro

Posted by Braekevelt Martin on Dec 29, 2018; 1:43pm
URL: http://imagej.273.s1.nabble.com/macro-tp5021594.html

Dear all,

I am novice in programming so excuse me if what i tried to program looks stupid.
I am trying to  make a macro for measuring a set of images one by one and after each measuring each image close it, so the macro should open the first image from the directory, execute the image adjustment, set it as big as possible on the screen, set it to 50% zoom, apply a grid and then let the operator do a hit count, save the count score, close the image and then opens the next image. This sequence should be done till all images from the directory are done, ...

I have some issues with the following :

The position of the image canvas should be put in the outermost top left corner with the full covering of the screen.
The points from the grid are too small, they should be somewhat bigger and also the line some thicker.
I cannot find any macro code except the close command to close a window after the measurements are done, with this code all the images are done one after another without possible to measure.

w = 4096;
h = 2160
  dir = getDirectory("Choose Source Directory ");
  list = getFileList(dir);
  for (i=0; i<list.length; i++) {
     showProgress(i+1, list.length);
     open(dir+list[i]);
     run("Canvas Size...", "width=&w height=&h position=Center zero");
     run("Unsharp Mask...", "radius=1 mask=0.60");
               run("Grid...", "grid=Points area=85700 color=yellow bold center");
     run("Set... ", "zoom=50");
//setTool("multipoint");
     run("Point Tool...", "type=Dot color=Red size=[Extra Large] label show counter=0");
     run("Measure");
     //close();
  }


Thanks for the help in advance,

Kindest regards,

Martin.
::DISCLAIMER:: This e-mail is confidential and intended for use by the addressee only. If you are not the intended recipient, please notify us immediately and delete this e-mail, as well as any attachment.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html