コード例 #1
0
    IJ.log(
        'Found %d spots in %d tracks.' % (model.getSpots().getNSpots(True),
                                          model.getTrackModel().nTracks(True)))

    # Print results in the console.
    headerStr = '%10s %10s %10s %10s %10s %10s' % ('Spot_ID', 'Track_ID',
                                                   'Frame', 'X', 'Y', 'Z')
    rowStr = '%10d %10d %10d %10.1f %10.1f %10.1f'
    for i in range(nChannels):
        headerStr += (' %10s' % ('C' + str(i + 1)))
        rowStr += (' %10.1f')

    IJ.log('\n')
    IJ.log(headerStr)
    tm = model.getTrackModel()
    trackIDs = tm.trackIDs(True)
    for trackID in trackIDs:
        spots = tm.trackSpots(trackID)

        # Let's sort them by frame.
        ls = ArrayList(spots)
        ls.sort(Spot.frameComparator)

        for spot in ls:
            values = [  spot.ID(), trackID, spot.getFeature('FRAME'), \
             spot.getFeature('POSITION_X'), spot.getFeature('POSITION_Y'), spot.getFeature('POSITION_Z') ]
            for i in range(nChannels):
                values.append(spot.getFeature('MEAN_INTENSITY%02d' % (i + 1)))

            IJ.log(rowStr % tuple(values))
コード例 #2
0
	IJ.log('TrackMate completed successfully.' )
	IJ.log( 'Found %d spots in %d tracks.' % ( model.getSpots().getNSpots( True ) , model.getTrackModel().nTracks( True ) ) )

	# Print results in the console.
	headerStr = '%10s %10s %10s %10s %10s %10s' % ( 'Spot_ID', 'Track_ID', 'Frame', 'X', 'Y', 'Z' )
	rowStr = '%10d %10d %10d %10.1f %10.1f %10.1f'
	for i in range( nChannels ):
		headerStr += ( ' %10s'  % ( 'C' + str(i+1) ) )
		rowStr += ( ' %10.1f' )
	
	IJ.log('\n')
	IJ.log( headerStr)
	tm = model.getTrackModel()
	trackIDs = tm.trackIDs( True )
	for trackID in trackIDs:
		spots = tm.trackSpots( trackID )

		# Let's sort them by frame.
		ls = ArrayList( spots );
		ls.sort( Spot.frameComparator )
		
		for spot in ls:
			values = [  spot.ID(), trackID, spot.getFeature('FRAME'), \
				spot.getFeature('POSITION_X'), spot.getFeature('POSITION_Y'), spot.getFeature('POSITION_Z') ]
			for i in range( nChannels ):
				values.append( spot.getFeature( 'MEAN_INTENSITY%02d' % (i+1) ) )
				
			IJ.log( rowStr % tuple( values ) )