Created
April 19, 2021 18:14
-
-
Save hinerm/4693a4e918e452e8d0e16a3edb9b7387 to your computer and use it in GitHub Desktop.
A trivial python script that takes an input image and outputs a "copy", with all values set to the first pixel value.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ OpService ops | |
#@ ImgPlus image | |
#@OUTPUT ImgPlus copy | |
#@OUTPUT Integer a | |
a = 21 | |
copy = ops.copy().img(image.getImg()) | |
c = copy.cursor() | |
c.fwd() | |
v = c.get().copy() | |
while (c.hasNext()) { | |
c.fwd() | |
c.get().set(v) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment