imagej / imagej2

Open scientific N-dimensional image processing :microscope: :sparkler:
https://imagej.net/
BSD 2-Clause "Simplified" License
1.2k stars 337 forks source link

Reconcile case issues with module parameters #231

Open ctrueden opened 5 years ago

ctrueden commented 5 years ago

From @tischi on the Image.sc Forum:

I realized something with the IJ2 Macro Command recording, namely that it removes all capitalization in the parameters, resulting in recordings such as:

run("Elastix", "elastixdirectory=/Applications/elastix_macosx64_v4.8 workingdirectory=/Users/tischer/Desktop/elastix-tmp fixedimagefile=/Users/tischer/Desktop/elastix-output/muscles.tif-transformed.tif movingimagefile=/Users/tischer/Desktop/elastix-output/muscles.tif-transformed.tif elastixparameters=Default usemask=false useinitialtransformation=false transformationtype=Translation numiterations=1 numspatialsamples=100 gaussiansmoothingsigmas=10,10,10 bsplinegridspacing=50,50,50 finalresampler=FinalLinearInterpolator outputmodality=[Save output as Tiff]");

This is fine and works as a macro, however when trying to use this as a starting point for running the command from command line, it does not work. The reason is that on the command line the parameters do need the correct capitalization, e.g. elastixdirectory should actually be elastixDirectory, otherwise one gets an error.

Would it maybe be possible to unify this?

Furthermore: SciJava module parameters are case-sensitive, whereas ImageJ1 macro parameters are case-insensitive.