apply binary image masks to lists of track lists
maskTracks(folder, trackll) filterOnCell(trackll, numTracks = 0) sampleTracks(trackll, num = 0)
folder | Full path to the output files. |
---|---|
trackll | A list of track lists. |
numTracks | Minimum number of required tracks in the trackll |
num | Number of tracks to randomly sample per trackl in trackll |
masked tracks in trackll format
IMPORTANT: It will take an extremely long time to mask large datasets. Filter/trim first using filterTrack() and trimTrack(), then mask using maskTracks(folder, trackll)! Note the mask file should have the same name as the output files with a '_MASK.tif' ending. If there are more mask files than trackll, masking will fail. If there are less mask files, trackls without masks will be deleted. Users can use plotMask() and plotTrackOverlay() to see the mask and its effect on screening tracks.
filterOnCell() eliminates all trackl in trackll that has less than numTracks tracks.
sampleTracks() randomly samples num number of tracks for each trackl in trackll.
#Basic masking with folder path with image masks folder = system.file('extdata','ImageJ',package='sojourner') trackll = createTrackll(folder=folder, input=3)#> #> Reading ParticleTracker file: epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_1.tif.csv ... #> #> 0mW_1 read and processed. #> #> Reading ParticleTracker file: epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_2.tif.csv ... #> #> 0mW_2 read and processed. #> #> Process complete.trackll.masked <- maskTracks(folder = folder, trackll = trackll)#> Reading mask file epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_1_MASK.tif #> Reading mask file epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_2_MASK.tif #> #> All files masked.#> #> Processing epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_1.tif.csv #> Processing epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_2.tif.csv #> Output combined plot...#> #> Done!plotTrackOverlay(trackll.masked)#> #> Processing epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_1.tif.csv #> Processing epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_2.tif.csv #> Output combined plot...#> #> Done!#> #> Reading mask file epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_1_MASK.tif#> #> Reading mask file epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_2_MASK.tif#> #> Done!#> #> Processing epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_1.tif.csv#> #> Processing epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_2.tif.csv#> #> Output combined plot...#> #> Done!#> #> Processing epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_1.tif.csv#> #> Processing epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_2.tif.csv#> #> Output combined plot...#> #> Done!#> #> Reading mask file epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_1_MASK.tif#> #> Reading mask file epl11AA_HTZ1Halo_No_RAP_fr10ms_120mW_2_MASK.tif#> #> Done!