|
This post was updated on Jul 09, 2012; 3:54pm.
Hi,
I was having the below metioned problem. Please help me out.
I am using command line to execute a macro
--> java -jar F:\ImageJ\jars\ij.jar -batch MacroAll.ijm
MacroAll.ijm contains code below
open("F:\\ImageJ\\newset\\IMG_0028.JPG");
open("F:\\ImageJ\\newset\\IMG_0030.JPG");
run("Extract SIFT Correspondences", "source_image=IMG_0028.JPG target_image=IMG_0030.JPG initial_gaussian_blur=1.60 steps_per_scale_octave=3 minimum_image_size=64 maximum_image_size=1024 feature_descriptor_size=4 feature_descriptor_orientation_bins=8 closest/next_closest_ratio=0.92 filter maximal_alignment_error=25 minimal_inlier_ratio=0.05 minimal_number_of_inliers=7 expected_transformation=Rigid");
run("bUnwarpJ", "source_image=IMG_0028.JPG target_image=IMG_0030.JPG registration=Accurate image_subsample_factor=0 initial_deformation=[Very Coarse] final_deformation=Fine divergence_weight=0 curl_weight=0 landmark_weight=0 image_weight=1 consistency_weight=10 stop_threshold=0.01");
saveAs("Jpeg", "F:\\ImageJ\\newset\\Registered Target Image.jpg");
Everything goes on fine until bUnwarpJ macro is reached. Then there is exception.
java.lang.NullPointerException
at bunwarpj.PointToolbar.<init>(PointToolbar.java:123)
at bunwarpj.MainDialog.<init>(MainDialog.java:126)
at bunwarpj.bUnwarpJ_.run(bUnwarpJ_.java:133)
at ij.IJ.runUserPlugIn(IJ.java:193)
at ij.IJ.runPlugIn(IJ.java:154)
at ij.Executer.runCommand(Executer.java:147)
at ij.Executer.run(Executer.java:78)
at ij.IJ.run(IJ.java:269)
at ij.macro.Functions.doRun(Functions.java:561)
at ij.macro.Functions.doFunction(Functions.java:79)
at ij.macro.Interpreter.doStatement(Interpreter.java:203)
at ij.macro.Interpreter.doStatements(Interpreter.java:191)
at ij.macro.Interpreter.run(Interpreter.java:102)
at ij.macro.Interpreter.run(Interpreter.java:72)
at ij.macro.Interpreter.run(Interpreter.java:83)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:102)
at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:87)
at ij.IJ.runMacroFile(IJ.java:121)
at ij.ImageJ.main(ImageJ.java:638)
If I run the same thing from fiji GUI, the macro is sucessfully executed. Please let me know what I am doing wrong.
Thanks.
|