IJ2 Command Batch Button for Folders

ij2command
batch-processing

#1

@imagejan

Is it possible to batch over:

@Parameter ( style = "directory" )
public File inputDirectory;

?

I tried but the UI does not let me drag and drop a folder instead of a file:

[WARNING] Some files were excluded for not matching the input requirements ()

#2

fwiw, it works for me using a script (not a full-fledged plugin)
Ooops, doesn’t work in batch mode for me either, I missed that part and mistakenly just hit “Run” not “Batch”.

Disregard the below :slightly_frowning_face:

as groovy:

#@File (style="directory") mydir
println(mydir)

My only idea would be to check what version of scijava you’re using (and maybe update).


#3

Hm, yup, this is were I got stuck last year:

There were a few issues back then, if I remember correctly, because we have to parse the style of the input parameter and create a suitable filter for it to transmit to the batch processor input. I didn’t have time to dig into it, so it’s not there yet, sorry.

I probably won’t have time to make progress before the NEUBIAS conference in February, but if you want to have a look, feel free. I can certainly give some pointers if needed.


#4

Any chance you want to enable that in the near future? It would be super useful :slight_smile:


#5

It’s on my list of things I want to do, but there are other priorities in my daily work, so I can’t promise anything. So any time “soon”, yes :slight_smile:

It’s good to know that you’d find it useful, I’ll see when I can find time to hack on it.


#6

In fact, I realised there is a workaround: If the user selects a file, the command can of course determine the parentDir and like this have some logic to also consider associated files in the same directory.