Running batch without importing tifs

Hey!
Is there a way to start the BiofilmQ batch mode without having to enter a directory with files, first?
I have quite a few different directories each with a lot of files and I would like to avoid having to go into every single one and import the tifs manually.

I realize that the advanced batch mode seems to be able to select all kinds of directories, but I can’t seem to figure out how to import the tifs in each directory, automatically.
The regexp cells in my parameter-file matches the filenames in the directories. Maybe there’s a function I haven’t found yet?

Thanks!
/Mark

Hi Marc,

yes, you are right: In principle someone can write a BiofilmQ batch processing script similar to the one for the bioformats-based import.

As of now, however, we did not create a suitable batch processing script for this purpose. I just wrote you a MATLAB script which converts an existing folder with 3D tiff stacks into the BiofilmQ format.

It requires a little knowledge on MATLAB regular expressions to extract the frame number from the file name. Just let me know, if you need help with this.

Input folder structure
C:\Users\jelli\Sample_data
├───Sample_data_example1
│       image1.tif
│       image10.tif
│       image11.tif
│       image12.tif
│       image13.tif
│       image14.tif
│       image2.tif
│       image3.tif
│       image4.tif
│       image5.tif
│       image6.tif
│       image7.tif
│       image8.tif
│       image9.tif
│
├───Sample_data_example2
│       image1.tif
│       image10.tif
│       image11.tif
│       image12.tif
│       image13.tif
│       image14.tif
│       image2.tif
│       image3.tif
│       image4.tif
│       image5.tif
│       image6.tif
│       image7.tif
│       image8.tif
│       image9.tif
│
└───Sample_data_example3
        image1.tif
        image10.tif
        image11.tif
        image12.tif
        image13.tif
        image14.tif
        image2.tif
        image3.tif
        image4.tif
        image5.tif
        image6.tif
        image7.tif
        image8.tif
        image9.tif
Output folder structure
C:\Users\jelli\Sample_data_converted
├───Sample_data_example1
│       image_frame000001_Nz21.tif
│       image_frame000002_Nz26.tif
│       image_frame000003_Nz32.tif
│       image_frame000004_Nz36.tif
│       image_frame000005_Nz50.tif
│       image_frame000006_Nz55.tif
│       image_frame000007_Nz67.tif
│       image_frame000008_Nz21.tif
│       image_frame000009_Nz26.tif
│       image_frame000010_Nz32.tif
│       image_frame000011_Nz36.tif
│       image_frame000012_Nz50.tif
│       image_frame000013_Nz55.tif
│       image_frame000014_Nz67.tif
│       metadata_global.mat
│       parameters.mat
│
├───Sample_data_example2
│       image_frame000001_Nz21.tif
│       image_frame000002_Nz26.tif
│       image_frame000003_Nz32.tif
│       image_frame000004_Nz36.tif
│       image_frame000005_Nz50.tif
│       image_frame000006_Nz55.tif
│       image_frame000007_Nz67.tif
│       image_frame000008_Nz21.tif
│       image_frame000009_Nz26.tif
│       image_frame000010_Nz32.tif
│       image_frame000011_Nz36.tif
│       image_frame000012_Nz50.tif
│       image_frame000013_Nz55.tif
│       image_frame000014_Nz67.tif
│
└───Sample_data_example3
        image_frame000001_Nz21.tif
        image_frame000002_Nz26.tif
        image_frame000003_Nz32.tif
        image_frame000004_Nz36.tif
        image_frame000005_Nz50.tif
        image_frame000006_Nz55.tif
        image_frame000007_Nz67.tif
        image_frame000008_Nz21.tif
        image_frame000009_Nz26.tif
        image_frame000010_Nz32.tif
        image_frame000011_Nz36.tif
        image_frame000012_Nz50.tif
        image_frame000013_Nz55.tif
        image_frame000014_Nz67.tif

If you open the new folders with BiofilmQ, you will be promted for missing metadata files. BiofilmQ fills the missing fields with default values. If you require the exact pixel sizes or time stamps for your analysis, you have to create the metadata file as well. Again: If you need help with this, just ping me :wink:

Eric

Wow, awesome Eric, thanks!
I guess for pixel size, I could just update that using the parameter file, right?

/Mark