Skip to content

Instantly share code, notes, and snippets.

@miyanari
Forked from miura/stack2list.py
Created September 4, 2013 17:26
Show Gist options
  • Save miyanari/6440065 to your computer and use it in GitHub Desktop.
Save miyanari/6440065 to your computer and use it in GitHub Desktop.
def stacklistGenerate(imp):
stk = imp.getStack()
imglist = []
print len(imglist)
for i in range(imp.getStackSize()):
ip = stk.getProcessor(i+1)
title = "img" + str(i+1)
impsingle = ImagePlus(title, ip.duplicate())
imglist.append(impsingle)
print len(imglist)
#imglist[20].show()
return imglist
imp = IJ.getImage()
ll = stacklistGenerate(imp)
ll[10].show()
for iimp in ll:
iimp.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment