Skip to content
Snippets Groups Projects
Commit f8446789 authored by David GEISSBUHLER's avatar David GEISSBUHLER
Browse files

fix for one frame

parent 81f63def
No related branches found
No related tags found
1 merge request!1fixed slices
Pipeline #36490 failed
...@@ -413,15 +413,13 @@ class StreamFile(): ...@@ -413,15 +413,13 @@ class StreamFile():
if isinstance(index, int): if isinstance(index, int):
data = self.hdf5_file.lread(data_path, index) data = self.hdf5_file.lread(data_path, index)
return data return np.stack([data])
elif isinstance(index, slice): elif isinstance(index, slice):
num_frame = self.get_stream_shape(stream_name) num_frame = self.get_stream_shape(stream_name)
print(num_frame)
if index.step == None: if index.step == None:
indices = list(range(index.start, index.stop)) indices = list(range(index.start, index.stop))
else: else:
indices = list(range(index.start, index.stop, index.step)) indices = list(range(index.start, index.stop, index.step))
print(indices)
data = np.stack([self.hdf5_file.lread(data_path, i) for i in indices]) data = np.stack([self.hdf5_file.lread(data_path, i) for i in indices])
return data return data
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment