Пример #1
0
    binip = n.getBinip()
    stk.addSlice(binip)
ImagePlus("tt", stk).show()
'''

IJ.log('Linking ...')
dlh = DLH(imp, 3, 10) # linkrange, distance
#dlh.setData(ntd.getXcoordA(), ntd.getYcoordA(),  ntd.getFrameA())
dlh.setData(nodes) # a new way, 20130321
nearestneighbor = LinkCostsOnlyDistance()
dlh.doLinking(nearestneighbor, False)

# convert to Tracks object
vttt = VecTrajectoryToTracks()
#vttt.run(dlh.getAll_traj())
vttt.run(dlh.getAll_traj(), nodes)
tracks = vttt.getTracks()
print "tracks", str(tracks.size())
for t in tracks.values():
    #print t.getTrackID(), t.getNodes().get(0).getX(), t.getNodes().size(), t.getFrameStart()
    print t.getNodes().get(0).getOrgroi()
tracks.accept(TrackReLinker())

# plotting part
vd = VD(imp)
#img2path = '/Volumes/D/Julia20130201-/NucleusSegmentationStudy/20130312/out_bernsen45.tif'
#outimp = IJ.openImage(img2path)
#vd.plotTracks(outimp)

#vd.plotTracks(tracks, imp)
vd.trackAllPlotter(tracks, imp)
Пример #2
0
#ppimp.show()

#maximp = NucToDots(imp).run()
#maximp.show()

ntd = NucToDots(imp);
ntd.run()
for i in ntd.getXcoordA():
        print i
        
IJ.log('test ')
dlh = DLH(imp, 2, 15) # linkrange, distance
# becareful with the swapped X and Y axis
#dlh.setData(jarray.array(ntd.getXcoords(), 'i'), jarray.array(ntd.getYcoords(), 'i'),  jarray.array(ntd.getFrame(), 'i'))
dlh.setData(ntd.getXcoordA(), ntd.getYcoordA(),  ntd.getFrameA())
nearestneighbor = LinkCostsOnlyDistance()
dlh.doLinking(nearestneighbor, False)
# convert to Tracks object
tracks = VecTrajectoryToTracks().runsimple(dlh.getAll_traj())
tracks.accept(TrackReLinker())

# plotting part
vd = VD(imp)
#img2path = '/Volumes/D/Julia20130201-/NucleusSegmentationStudy/20130312/out_bernsen45.tif'
#outimp = IJ.openImage(img2path)
#vd.plotTracks(outimp)

#vd.plotTracks(tracks, imp)
vd.trackAllPlotter(tracks, imp)
#vd.trackGapLinkPlotter(tracks, imp)