<html>
<head>
<base href="http://fiji.sc/bugzilla/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Cannot run commands from the ijpb/MorphoLibJ plugin in --headless mode using --jython script option"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=1107">1107</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Cannot run commands from the ijpb/MorphoLibJ plugin in --headless mode using --jython script option
</td>
</tr>
<tr>
<th>Product</th>
<td>Fiji
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>Mac OS
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P5
</td>
</tr>
<tr>
<th>Component</th>
<td>Plugins
</td>
</tr>
<tr>
<th>Assignee</th>
<td>imagej-bugs@imagej.net
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ghv2@psu.edu
</td>
</tr></table>
<p>
<div>
<pre>I'm using Fiji version 21041125 and ijpb/MorphoLibJ release v1.0.7.
I've tried several different commands from the fabulous ijpb/MorphoLibJ plugin
library when running Fiji using --headless and --jython. I have many Jython
scripts that call other Fiji plugin commands successfully. My scripts that
attempt to use commands generally follow this pattern:
# Open the input image file.
input_image_plus = IJ.openImage( input )
# Create a copy of the image.
input_image_plus_copy = input_image_plus.createImagePlus()
image_processor_copy = input_image_plus.getProcessor().duplicate()
input_image_plus_copy.setProcessor( "iCopy", image_processor_copy )
# Run the command.
IJ.run( input_image_plus_copy, "Fill Holes (Binary/Gray)", "" )
# Save the ImagePlus object as a new image.
IJ.saveAs( input_image_plus_copy, output_datatype, output_path )
The script finishes successfully, but no analysis is performed on the image
(i.e., it remains basically the same as the original input). Also, when
running from the command line (instead of a Browser), the Fiji log ends with a
"Java Null pointer exception".
I'm wondering if I'm missing something, or if there is something that needs to
be added to the ijpb/MorphoLibJ plugin that enables it to be run in headless
mode via Python script calls. I'm not a Java expert, so any help will be much
appreciated.
Thanks!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>