Fiji error: "No images file selected" when using a macro that calls the plugin 'Average Images' -


i create macro fiji, run using matlab.

i average 3 images using plugins>stacks>average images.

i used first plugins>macro>record... idea use. here result:

run("average images", "add=d:\\corinne\\diabetes_paper_meas\\2013_01_29\\measurement.007_cb\\measurement._cb_frame0_pvar-8bit_combined.tif add=d:\\corinne\\diabetes_paper_meas\\2013_01_29\\measurement.007_cb\\measurement._cb_frame1_pvar-8bit_combined.tif add=d:\\corinne\\diabetes_paper_meas\\2013_01_29\\measurement.007_cb\\measurement._cb_frame2_pvar-8bit_combined.tif"); saveas("tiff", "d:\\corinne\\diabetes_paper_meas\\2013_01_29\\measurement.007_cb\\test.tif"); 

however, when run macro got error: no images file selected. however, in fiji not need open images run plugin add files through window interface... of course, since running macro not working same error when use following macro:

file = getargument; if (file=="") exit ("no argument!"); setbatchmode(true); file_vasc = file;  file_vasc_frame_0 = file; file_vasc_frame_1 = replace(file, "\\_frame0_pvar-8bit_combined.tif", "_frame1_pvar-8bit_combined.tif"); file_vasc_frame_2 = replace(file, "\\_frame0_pvar-8bit_combined.tif", "_frame2_pvar-8bit_combined.tif");   run("average images", "add=file_vasc_frame_0 add=file_vasc_frame_1 add=file_vasc_frame_2"); file_vasc_out = replace(file, "frame0_pvar-8bit_combined.tif", "_vasc_averaged.tif"); saveas("tiff", file_vasc_out); 

somebody has idea should do?

thanks

the average images plugin using dialogs in non-standard way , therefore not scriptable: when running plugin in fiji macro recorder active (plugins>macros>record... , plugins>stacks>average images), see fiji complain add second file list:

duplicate keyword:

command: "average images"

keyword: "add"

value: /path/to/your/file

add underscore corresponding label in dialog make first word unique.

this bug in plugin (it makes multiple use of same opendialog thereby recording duplicate keywords in macro recorder). can report via help>report bug, fear plugin not actively maintained @ moment.

in case, there simple alternate way average images in imagej without requiring plugin, using image>stacks>images stack , image>stacks>z project... commands:

setbatchmode(true); open("/path/to/first-image.tif"); open("/path/to/second-image.tif"); run("images stack", "name=stack title=[]"); run("z project..."); saveas("tiff", "/path/to/new-file-name.tif"); 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -