Skip to content

Commit

Permalink
Numpy image writer added
Browse files Browse the repository at this point in the history
  • Loading branch information
tfarago committed Oct 30, 2013
1 parent 3878f7a commit 5668125
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions concert/storage.py
@@ -1,6 +1,7 @@
"""Storage implementations."""
import os
import logging
import numpy as np
from concert.ext import tifffile
from concert.helpers import async

Expand Down Expand Up @@ -57,6 +58,11 @@ def write_libtiff(file_name_prefix, data):
return file_name


def write_numpy(file_name_prefix, data):
"""Save image *data* to file named *file_name_prefix*."""
np.save(file_name_prefix, data)


def create_folder(folder, rights=0o0750):
"""Create *folder* and all paths along the way if necessary."""
if not os.path.exists(folder):
Expand Down

0 comments on commit 5668125

Please sign in to comment.