Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 41c523c

Browse files
committed
update filestructure for multiple 9grid video views
1 parent 4ee4151 commit 41c523c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

mti_nma/bin/make_9grid_mode_video.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414

1515

1616
def create_gif_from_png_dir(
17-
pngdir="../../local_staging/nma/nma_Nuc/nma_data/9grid_frames/",
18-
save_file_path="../../local_staging/nma/nma_Nuc/nma_data/9grid.gif"):
17+
basedir="../../local_staging/nma/nma_Nuc/nma_data/9grid_frames/",
18+
save_file_path="../../local_staging/nma/nma_Nuc/nma_data/9grid_videos/"):
1919

20-
# Create empty array
21-
images = []
22-
for filename in os.listdir(pngdir):
23-
images.append(imageio.imread(pngdir + filename))
24-
imageio.mimsave(save_file_path, images)
20+
# Create empty array
21+
for dirname in os.listdir(basedir):
22+
images = []
23+
pngdir = basedir + dirname
24+
for filename in os.listdir(pngdir):
25+
images.append(imageio.imread(pngdir + "/" + filename))
26+
imageio.mimsave(save_file_path + f"9grid_{dirname}_video.gif" , images)
2527

2628

2729
create_gif_from_png_dir()

0 commit comments

Comments
 (0)