Hey All!

I am having an issue (likely my own mistake) using imread_collection() to load a set of 480 .tif images from a folder.

I have an external drive with 480 images in it such that the path name for each image is:
'D:\img_channel000_position000_time000000000_z000.tif', 'D:\img_channel000_position000_time000000001_z000.tif', 'D:\img_channel000_position000_time000000002_z000.tif'
and so on. The 480 images are the only objects on the external drive. I know this is the path name as I have successfully used

import skimage
from skimage import io



to import an image and perform a first-pass at the analysis I was looking to accomplish. I, perhaps naively, then attempted to use the following code to import the entirety of the collection

import skimage
from skimage import io



However, the variable ic is never even created. The code runs successfully without error, but nothing occurs. Is this a problem with how I have implemented the load pattern? I have also tried the more complete D:\img_channel000_position000_*_z000.tif, but nothing occurred. Any advice would be greatly appreciated!

Hi @cameron3332!

It may have something to do with the \. In Python, that escapes the next character:

In [1]: print('foo\bar')
foar


So, you may want to try escaping those back-slashes:

In [2]: print('foo\\bar')
foo\bar


I hope that works!