Exemple #1
0
    def _test_stack_along(self, name, extension, sequence_axis, expected):
        fileName = os.path.join(self.tmpdir, f"{name}{extension}")
        reader = OpDataSelection(graph=Graph(), forceAxisOrder=False)
        reader.WorkingDirectory.setValue(os.getcwd())
        reader.Dataset.setValue(FilesystemDatasetInfo(filePath=fileName, sequence_axis=sequence_axis))
        read = reader.Image[...].wait()

        assert numpy.allclose(read, expected), f"{name}: {read.shape}, {expected.shape}"
Exemple #2
0
    def _test_stack_along(self, name, extension, sequence_axis, expected):
        fileName = os.path.join(self.tmpdir, f'{name}{extension}')
        graph = lazyflow.graph.Graph()
        reader = OpDataSelection(graph=graph, forceAxisOrder=False)
        reader.WorkingDirectory.setValue(os.getcwd())
        info = DatasetInfo(fileName, sequence_axis=sequence_axis)
        reader.Dataset.setValue(info)
        read = reader.Image[...].wait()

        assert numpy.allclose(
            read, expected), f'{name}: {read.shape}, {expected.shape}'