Question about "Batch spot detection with custom output" protocol

25 views
Skip to first unread message

Anke

unread,
Jun 3, 2013, 9:05:41 PM6/3/13
to icy-so...@googlegroups.com
Hi, 

I have been using the JavaScript block from the "Batch spot detection with custom output" protocol in order to read the file path, create a new sub-folder and save the result of my image manipulations into this subfolder with a new filename. It works, but in the output console I constantly get the error message Unknown: FileUtil at line: 6 (or line 7). The code I am using is below. Any idea what could be causing the error message?

Thanks,
Anke


importClass( java.io.File );
importClass
( Packages.icy.file.FileUtil );


dir
= FileUtil.getDirectory( input0.getAbsolutePath() );
fileName
= FileUtil.getFileName( input0.getAbsolutePath() );
FileUtil.createDir( dir+"/binary" );
output0
= new File( dir +"/binary/" + fileName + "-binary.tif" );


Thomas Provoost

unread,
Jun 4, 2013, 8:35:42 AM6/4/13
to icy-so...@googlegroups.com
Hi Anke,

I just tested your code, and indeed, there is an issue: it is a matter of spaces insides the parentheses of importClass. It is an error on my side, so the engine has absolutely no problem running the code, but I fail at interpreting it correctly. 

I'm going to address this bug, but if you want to stop having it before I upload a new version, simply remove those spaces will do it. Thank you for the report!

By the way, in the script editor, you can always use Edit > Format if you want to format your code automatically.

Cheers,

Thomas

Anke

unread,
Jun 4, 2013, 12:18:18 PM6/4/13
to icy-so...@googlegroups.com
Thanks, Thomas, this works.

Btw, it still spits out the error message Unknown: input0 at line: 4 (before I even start the protocol, just as soon as I open it in the editor), but that doesn't affect the way the protocol runs, apparently.

Cheers,
Anke

Thomas Provoost

unread,
Jun 4, 2013, 6:17:29 PM6/4/13
to icy-so...@googlegroups.com
Hi,

I updated the Script Editor so this should work now. Please keep me updated.

Cheers,
Thomas


2013/6/4 Anke <anke....@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Icy imaging" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icy-software...@googlegroups.com.
To post to this group, send email to icy-so...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/icy-software/89306fba-4742-489a-afb2-aa3b87e687e6%40googlegroups.com?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages