Source code for load_list_files

# CellTracking.py
# By MW, Jun 2013
# GPLv3+
#
# Ths script is the mos basic package to load a movie. It takes a list of
#+ files as an input, perform some verifications then returns it to create a /Channel/ object.
# This loader is a low level loader. You may not use it as it may exist a more specific loader adapted to your special case that does what you want in a simpler manner.

import logging, os

[docs]def Load(l) : """Main function, takes a list of files as an input. Returns a checked list of files (files exist and all of them have the same size, bit depth...)""" # check if files exist ok = True for i in l : if not os.path.isfile(i) : ok = False l = [] if not ok : logging.warning("Some files do not exist, aborting") else : logging.info("Loading %s files with 'load_list_files'.", str(len(l))) return l # For the moment, the Load function simply returns a list, but it will be very easy to return a more complex object. This list should then be used to initialize a Channel object