From 4f6b4d9926363500f956895c6ce12ecc4f944fc0 Mon Sep 17 00:00:00 2001 From: DenisSch Date: Thu, 19 Mar 2020 14:36:32 -0400 Subject: [PATCH] Change shape of tiff image --- SingleCellDataExtraction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SingleCellDataExtraction.py b/SingleCellDataExtraction.py index 4536768..3f6c1fc 100644 --- a/SingleCellDataExtraction.py +++ b/SingleCellDataExtraction.py @@ -92,7 +92,7 @@ def PrepareData(mask,image,channel_names): image_loaded = skimage.io.imread(image,plugin='tifffile') #print('TIF(F) found') # Remove extra axis - image_loaded = image_loaded.reshape((image_loaded.shape[0],image_loaded.shape[3],image_loaded.shape[4])) + image_loaded = image_loaded.reshape((image_loaded.shape[1],image_loaded.shape[3],image_loaded.shape[4])) #Check to see if image is hdf5 elif image_path.suffix == '.h5' or image_path.suffix == '.hdf5': @@ -183,4 +183,4 @@ def MultiExtractSingleCells(mask,image,channel_names,output): im_full_name = os.path.basename(image) im_name = im_full_name.split('.')[0] - print("Finished "+str(im_name)) \ No newline at end of file + print("Finished "+str(im_name))