Opening and Processing Many .bmp Files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Opening and Processing Many .bmp Files

sconnora
This is my first Macro and I am trying to open a bunch of image files and get their xy intensity data.  When I try to run I get an error message saying I have no window selected when trying to do Plot.getValues(x,y).
Any insight would be greatly appreciated.


input="/Users/connor/Work/SWEP2015/RICalibrations/EGGlycerolNaClSucrose/PhotosforMacro/";
photos=getFileList(input);
setBatchMode(true);

for (i=0; i<photos.length; i++)
{
        fun(input, photos[i]);

for (j=0; j<x.length; j++)
{
        print(y[j]);
        saveAs(xy Coordinates, /Users/connor/Work/SWEP2015/RICalibrations/EGGlycerolNaClSucrose/ImageJOutput/);
}
}
setBatchMode(false);

function fun(input, photo)
{
        open(input+photo);
        id=getImageID();
        selectImage(id);
        Plot.getValues(x, y);
}