[ImageJ-devel] 'ops not defined' when running jython script

Brian Northan bnorthan at gmail.com
Mon Aug 4 15:32:13 CDT 2014


Hi List

A couple of things...

1.  The last couple of days when I try to extract the Fiji Linux 64
continuous release tar file I get an error "truncated gzip input".  I can
work around this by downloading the "all platforms" package instead.

2.  It seems that the ops service is not getting injected into my jython
scripts.  Scripts works fine (ie data and display are injuected) until I
try to call an op.  Then I get "ops is not defined".   This only happens
when using a Fiji release.  If I run imagej2 through a development
environment using maven it works.

Thanks, an example script is below

Brian

# @DatasetService data
# @DisplayService display
# @OpService ops

# define a local directory to get the images from
directory="/home/bnorthan/Brian2014/Images/TempForEasyAccess/"

# use 2-channels of the lena image for test image
image1Name="lena_red.tif"
image2Name="lena_green.tif"

# open first image
image1=data.open(directory+image1Name)
display.createDisplay(image1.getName(), image1);

# open second image
image2=data.open(directory+image2Name)
display.createDisplay(image2.getName(), image2);

# add the images
image3 = ops.add(image1,image2)
display.createDisplay(image3.getName(), image3)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20140804/01cf763f/attachment.html>


More information about the ImageJ-devel mailing list