Hi,
I am new to the forum. I have inherited a workflow that calls bioformats through imagej. I submitted this issue to the image forum, but have not received any response so I am trying here. The issue is an error that occurs when running headless and trying to import an image. I have several macros that attempt to load different images (nd2 and tiff) to reserve them in different formats or conversion states (eg. 32 to 16 bit). The same macros all produce the expected outputs when run from the command line on a window that allows gui creation (without the --headless switch), even though no gui is produced. The same command fails is I run it with the --headless switch or if I run it on a batch node with no GUI capability. If I remove the bioformats call, the macros run ok as far as I can tell so it seems it is within the bioformats part of the code.
It sounds to me like the code is trying to launch a dialog box and exits as soon as it fails that test:
here is the simple macro:
macro "simpleMacro" {
print("opened ok");
nd2file = getArgument();
setBatchMode(true);
p1=lastIndexOf(nd2file,"/");
p2=lastIndexOf(nd2file,".");
fileroot=substring(nd2file,p1+1,p2);
filepieces=split(fileroot,"_");
print(fileroot);
print("importing "+nd2file);
run("Bio-Formats Importer","open=nd2file");
print("read ok");
}
here is the command and error listing (partial)
../imagej.new/Fiji.app/ImageJ-linux64 --headless -macro simple_macro.ijm kras_nd2s/Plate_PharmaArava_2477_2480_WellH06_Seq0090.nd2
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
opened ok
Plate_PharmaArava_2477_2480_WellH06_Seq0090
importing kras_nd2s/Plate_PharmaArava_2477_2480_WellH06_Seq0090.nd2
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
loci/plugins/in/MainDialog.rebuildDialog(Lij/gui/GenericDialog;)V @1926: invokestatic
Reason:
Type 'ij/gui/GenericDialog' (current frame, stack[0]) is not assignable to 'java/awt/Container'
Current Frame:
bci: @1926
flags: { }
locals: { 'loci/plugins/in/MainDialog', 'ij/gui/GenericDialog', 'java/util/List', 'java/util/List', 'java/util/List', 'java/awt/Label', 'java/awt/Label', 'java/awt/Label', 'java/awt/Label', '[Ljava/awt/Component;', 'java/lang/String',
can you please provide some assistance - this is part of a high content assay so I really need to be able to run this in batch mode.
thank you for your help !
Bob