Skip to content
This repository was archived by the owner on Jul 30, 2019. It is now read-only.
This repository was archived by the owner on Jul 30, 2019. It is now read-only.

util.merge_tiffs does not look for files in a folder #18

Description

@gminami

When I try to read a sequence of files in a folder (in this case, "data"),

params = {
    'image_path': './data/',
}

"merge_tiffs" seems to find files in the root folder, instead of the 'image_path'.
img = util.merge_tiffs(params['image_path'], './autofluor.tiff')

/root/.local/lib/python2.7/site-packages/ndreg-1.0.0-py2.7.egg/ndreg/util.pyc in merge_tiffs(path_to_tiffs, filename)
171
172 # now lets go through them and make a tif
--> 173 combined_tiff = sitk.ReadImage(files)
174
175 # now save the tiff

/usr/local/lib/python2.7/dist-packages/SimpleITK/SimpleITK.pyc in ReadImage(*args)
8330
8331 """
-> 8332 return _SimpleITK.ReadImage(*args)
8333 class HashImageFilter(ProcessObject):
8334 """

RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK/Code/IO/src/sitkImageReaderBase.cxx:74:
sitk::ERROR: The file "181023_10-22-52_GM0322_C00_z0000.ome.tif" does not exist.

I can read this tiff file if I set the 'image_path' as './data/181023_10-22-52_GM0322_C00_z0000.ome.tif' and run img = util.imgRead(params['image_path']) or img = sitk.imgRead(params['image_path']).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions