Macro Error Message


Line profile tool.
Is it possible to use the line profile tool to graph the “greyness” of the attached image?
Any assistance greatly appreciated.
Joe

You can graph the intensities across the image by creating a line or rectangular selection and using the Analyze>Plot Profile command.

The error message in the screenshot is caused by a bug in the macro interpreter that is fixed in the ImageJ 1.53c6 daily build. The working example below creates an image with a rectangular selection, sets the color to the default selection color and fills the selection with that color.

To upgrade to the daily build, use the Help>Update ImageJ command and select “daily build” from the drop down menu.

  newImage("Untitled", "rgb noise", 500, 500, 1);
  makeRectangle(120, 93, 245, 261);
  setColor(Roi.getDefaultColor);
  makeRectangle(120, 93, 245, 261);
  fill;

1 Like