path = File.openDialog("Select a File"); //open(path); // open the file dir = File.getParent(path); name = File.getName(path); size=File.length(path); print(size); //divide total length by numchannels and 2 since each pixel takes up 2 bytes numchannels=3; size=size/(numchannels*2); print(size); size=round(pow(size, 1/2)); print(size); sizeXnumChan=size*numchannels; run("Raw...", "open=[path] image=[16-bit Unsigned] width=size height=sizeXnumChan offset=12 number=1 gap=0 little-endian open"); //run("Brightness/Contrast..."); //run("Channels Tool..."); var min=3; var max=15; setMinAndMax(min, max);