Unrecognized Ext Function in Macro

Good Afternoon Everyone,

I’m rather new to imagej macro language, but I haven’t been able to fix an issue I’m having. I’m using the radial_profile_angle_ext inside a macro to make it run on a directory. When I run the macro to process the batch, I get an error message stating “Unrecognized Ext Function” the first time I call an Ext. Does this have to do with the function processFile? I tried removing that and just creating a for loop, but that doesn’t work either.

The odd thing is I can call the ext functions in a separate macro that just processes 1 image.

The block of code where the error occurs is here:

  function processFile(path) {
       if (endsWith(path, ".mccd")) {
           run("Enhance Contrast...", "saturated=0.4 normalize");
		run("Radial Profile Angle", "x_center=3974 y_center=3934.5 radius=3800 starting_angle=135 integration_angle=40 use_spatial_calibration");
           run("Clear Results");

				for(j = 0; j != 1; j++) {           
					for(i = 0; i != Ext.getBinSize; i++) {

Error occurs on last line at Ext.getBinSize
Greatly appreciate any insight into the issue.

Welcome to the forum, @atclark!

Sorry that your post remained unanswered for quite a while.

As I just found out from a quick search for getBinSize (via http://search.imagej.net/), the macro extension function Ext.getBinSize seems to be provided by the Radial Profile Extended plugin. From the plugin documentation:

The MacroExtension features for exporting the plot data in macros are:

  • Ext.getStackSize : to get the number of images on the stack (is similar than to get the slices value after a getDimensions(width, height, channels, slices, frames))
  • Ext.getBinSize : to get the length of the curve array
  • Ext.getXValue(j) : to get the distance from center at position i (0 <= i < Ext.getBinSize)
  • Ext.getYValue(i,j): to get the curve value at position i, at slice j (when trying to access to Ext.getYValue(i,j) values with j > 0, it is mandatory to activate the calculate_radial_profile_on_stack checkBox)

Can you please make sure you have the plugin jar file in your ImageJ.app/plugins directory?

1 Like