Last active
July 18, 2019 22:18
-
-
Save weinberz/08693f5fc684d8d3a3d11fd8475cbbec to your computer and use it in GitHub Desktop.
Quick directory scan for importing files for use in Danuser lab's utrack processing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root = pwd; | |
| directories = dir(root); | |
| directories(ismember( {directories.name}, {'.', '..'})) = []; | |
| directories = directories([directories.isdir]); | |
| for k=1 : length(directories) | |
| outputdir = [root filesep directories(k).name]; | |
| files = dir(outputdir); | |
| filename_idx = find(not(cellfun('isempty',strfind({files.name}, 'tif')))); | |
| filename = files(filename_idx).name; | |
| MD = MovieData([outputdir filesep filename], ... | |
| 'importMetadata', false, ... | |
| 'outputDirectory', outputdir); | |
| MD.set('pixelSize_',108.3, ... | |
| 'timeInterval_', 0.033, ... | |
| 'camBitdepth_', 16, ... | |
| 'numAperture_', 1.49) | |
| MD.channels_.set('emissionWavelength_', 665,... | |
| 'fluorophore_', 'alexa647',... | |
| 'imageType_', 'TIRF') | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment