run_ConvertToTiff

run_ConvertToTiff


Exports imaging data to .TIF files.

Description


This function exports imaging data created in umIT to a multi-frame .TIF file. For image time series (dimensions Y,X,T), the function will create a single .TIF file containing the image series, with one page per frame. For image time series split by trials (dimensions Y,X,T,E), a .TIF file will be created for each trial. This function does not have optional parameters.

Input


A .dat file (name or path; a bare name is also looked up in the SaveFolder) with dimensions Y,X,T, Y,X,T,E or a single Y,X frame. Arrays, UMT structures and .umt files are not supported. The file is streamed in blocks of frames, so its size is limited by the disk, not by the RAM (Low-RAM mode is always on).

Output


For Y,X,T (or Y,X) data:
A multi-frame .TIF file will be created in the SaveFolder with the name of the .dat file prepended with the string 'img_'. For instance, the .TIF file from the file fluo.dat will be named img_fluo.tif.

For Y,X,T,E data:
One multi-frame .TIF file will be created in the SaveFolder for each trial (E slice). the filename will be appended with the condition (C) and repetition(R) indices as so: 'img_<FILENAME>_C<index>_R<index>.tif'. For example, for a recording with name DF_F.dat with one condition and 10 repetitions the TIF files will be created as so: img_DF_F_C1_R1.tif, img_DF_F_C1_R2.tif, ..., img_DF_F_C1_R10.tif. A companion text file, img_<FILENAME>_info.txt, is also created in CSV format; it lists the generated TIF file name, the condition name and the repetition index.

Event labels

For Y,X,T,E data, the E axis is labeled from the events.mat file located in the folder of the .dat file. Without an events.mat, the slices are labeled as repetitions 1 to E of a single condition. An E axis that cannot be matched to events.mat is rejected, because the file names would carry wrong labels.

File format

Pages are written as 32-bit floating-point (single) values and no compression is applied. A file larger than 3.9 GB is written as BigTIFF.


Back to top

Copyright © LabeoTech 2023. This work is licensed under the GNU General Public License, Version 3.0.