Skip to content
Snippets Groups Projects
Commit 609e0d09 authored by Eric Wait's avatar Eric Wait
Browse files

Removed code not necessary

parent d903a910
No related branches found
No related tags found
No related merge requests found
%% read
im = tiffReader('DAPI Olig2-514 GFAP-488 Dcx-647 Laminin-Cy3 Bcatenin-568 20x20');
chan1_8 = uint8(im(:,:,:,1,1));
%% threshold
chan1Bin = CudaMex('OtsuThresholdFilter',chan1_8,0.8);
chan1Close = CudaMex('MorphClosure',chan1Bin,[3,3,2]);
chan1Open = CudaMex('MorphOpening',chan1Close,[5,5,2]);
%% draw
figure
imagesc(chan1_8(:,:,20))
colormap gray
figure
imagesc(chan1Bin(:,:,20))
colormap gray
figure
imagesc(chan1Close(:,:,20))
colormap gray
figure
imagesc(chan1Open(:,:,20))
colormap gray
\ No newline at end of file
function im = tiffReader(datasetName,dirName,nameConvention,cPos,tPos,zPos)
global DatasetName OrgDir
DatasetName = datasetName;
im = [];
if (~exist('dirName','var'))
fprintf('Select Image Dir...');
dirName = uigetdir();
disp(dirName);
end
if (~exist('nameConvention','var'))
nameConvention = '_c%d_t%04d_z%04d%s';
cPos = 1;
tPos = 2;
zPos = 3;
end
OrgDir = dirName;
dList = dir(fullfile(dirName,'*.tif*'));
mxC = 0;
mxT = 0;
mxZ = 0;
for i=1:length(dList)
vals = textscan(dList(i).name,[datasetName nameConvention]);
if (isempty(vals) || isempty(vals{1}) || isempty(vals{2}) || isempty(vals{3}))
continue;
end
c = vals{cPos};
t = vals{tPos};
z = vals{zPos};
im(:,:,z,t,c) = imread(fullfile(dirName,dList(i).name));
if (c>mxC)
mxC = c;
end
if (t>mxT)
mxT = t;
end
if (z>mxZ)
mxZ = z;
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment