示例#1
0
#maximp = NucToDots(imp).run()
#maximp.show()

ntd = NucToDots(imp);
ntd.run()

subwwhh = 120 # size of sub image
# from here is the extraction
'''
nrp = NRP()
nrp.getPerNucleusBinImgProcessors(imp, subwwhh, ntd.getXcoordA(), ntd.getYcoordA(), ntd.getFrameA())
stk = nrp.getBinStack();
'''

en = NucleusExtractor(imp, ntd.getXcoordA(), ntd.getYcoordA(), ntd.getFrameA())
en.constructNodes(subwwhh)
en.analyzeDotsandBinImages()
nodes = en.getNodes()
stk = ImageStack(subwwhh, subwwhh)
for n in nodes:
    binip = n.getBinip()
    stk.addSlice(binip)

'''
stk = ImageStack(subwwhh, subwwhh)
for i, f in enumerate(ntd.getFrameA()):
    ip = imp.getStack().getProcessor(f)
    roi = nrp.makeRoi(ip, ntd.getXcoordA()[i], ntd.getYcoordA()[i], subwwhh, subwwhh)
    subip = nrp.extract(ip, roi)
    binip = nrp.binarize(subip)
    stk.addSlice(binip)