From 9e63d2d9c0069b4e6d2c5e309e7d17c90da0bc2d Mon Sep 17 00:00:00 2001 From: danielsnider Date: Sun, 2 Jul 2017 20:00:22 -0400 Subject: [PATCH] temp --- islet_functions/LoadImages.m | 2 +- islet_functions/NewMeasurements.m | 7 ++++--- islet_functions/SmoothIslet.m | 4 ++-- islet_segmentation_pipeline.m | 5 ++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/islet_functions/LoadImages.m b/islet_functions/LoadImages.m index ce38a9e..c1ac9dc 100644 --- a/islet_functions/LoadImages.m +++ b/islet_functions/LoadImages.m @@ -1,5 +1,5 @@ function [DAPI, ECad, PDX1] = LoadImages(folder) - if or(contains(folder, '2nd image set'), contains(folder, '3rd image set')) + if strfind(folder, '2nd image set') | strfind(folder, '3rd image set') DAPI = im3dread(folder, '*.tif', 1); % channel: DAPI ECad = im3dread(folder, '*.tif', 2); % channel: e-cadherin PDX1 = im3dread(folder, '*.tif', 3); % channel: pdx1 diff --git a/islet_functions/NewMeasurements.m b/islet_functions/NewMeasurements.m index 0d54168..31a4d64 100644 --- a/islet_functions/NewMeasurements.m +++ b/islet_functions/NewMeasurements.m @@ -115,11 +115,12 @@ newResults.Stack = stack_name'; % EXPERIMANTAL CLASS (control, torin, or torin wash) - if or(contains(char(folder),'\ctl'),contains(char(folder),'\Control')) + if or(strfind(char(folder),'\ctl'), strfind(char(folder),'\Control')) + if strfind(char(folder), '2nd image set') experimental_class = 'Control' - elseif contains(char(folder),'\Torin_wash') + elseif strfind(char(folder),'\Torin_wash') experimental_class = 'Wash' - elseif contains(char(folder),'\Torin') + elseif strfind(char(folder),'\Torin') experimental_class = 'Torin' else error('Error: did not recognized folder: %s', folder) diff --git a/islet_functions/SmoothIslet.m b/islet_functions/SmoothIslet.m index e241e72..b794775 100644 --- a/islet_functions/SmoothIslet.m +++ b/islet_functions/SmoothIslet.m @@ -1,7 +1,7 @@ function cyto_smooth = SmoothIslet(cyto, folder) - if contains(folder, '3rd image set') + if strfind(char(folder), '3rd image set') cyto_smooth = imgaussfilt3(cyto,[4 4 3]); - elseif contains(folder, '2nd image set') + elseif strfind(char(folder), '2nd image set') cyto_smooth = imgaussfilt(cyto,6); else error('Error: did not recognized folder: %s', folder) diff --git a/islet_segmentation_pipeline.m b/islet_segmentation_pipeline.m index 27f8fb7..1bf8101 100644 --- a/islet_segmentation_pipeline.m +++ b/islet_segmentation_pipeline.m @@ -1,5 +1,4 @@ set(0,'DefaultFigureWindowStyle','docked') -addpath '\\carbon.research.sickkids.ca\rkafri\Miriam\Matlab function library' addpath '\\carbon.research.sickkids.ca\rkafri\YuvalDor\mouse islet z-stacks\code\islet_functions' inpath = '\\carbon.research.sickkids.ca\rkafri\YuvalDor\mouse islet z-stacks\images\'; @@ -25,9 +24,9 @@ % '2nd image set\Whole_mount_cy5pdx_cy3E-cad_DAPI_140217\Torin_1-0004\Torin_1-0004\' ... % '2nd image set\Whole_mount_cy5pdx_cy3E-cad_DAPI_140217\Torin_1-0005\Torin_1-0005\' ... % '2nd image set\Whole_mount_cy5pdx_cy3E-cad_DAPI_140217\Torin_wash_1-0001\Torin_wash_1-0001\' ... - '2nd image set\Whole_mount_cy5pdx_cy3E-cad_DAPI_140217\Torin_wash_1-0002\Torin_wash_1-0002\' ... + % '2nd image set\Whole_mount_cy5pdx_cy3E-cad_DAPI_140217\Torin_wash_1-0002\Torin_wash_1-0002\' ... % '2nd image set\Whole_mount_cy5pdx_cy3E-cad_DAPI_140217\Torin_wash_1-0003\Torin_wash_1-0003\' ... -% '2nd image set\Whole_mount_cy5pdx_cy3E-cad_DAPI_140217\Torin_wash_1-0005\Torin_wash_1-0005\' ... +'2nd image set\Whole_mount_cy5pdx_cy3E-cad_DAPI_140217\Torin_wash_1-0005\Torin_wash_1-0005\' ... }; %% REJECTED ISLETS