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

Updated tester

parent 9b681118
No related branches found
No related tags found
No related merge requests found
...@@ -34,19 +34,19 @@ for i=1:7 ...@@ -34,19 +34,19 @@ for i=1:7
typeTime = tic; typeTime = tic;
switch (i) switch (i)
case 1 case 1
typ = 'uint8'; typ = 'uint8'
case 2 case 2
typ = 'uint16'; typ = 'uint16'
case 3 case 3
typ = 'int16'; typ = 'int16'
case 4 case 4
typ = 'uint32'; typ = 'uint32'
case 5 case 5
typ = 'int32'; typ = 'int32'
case 6 case 6
typ = 'single'; typ = 'single'
case 7 case 7
typ = 'double'; typ = 'double'
end end
image1 = tiffReader(typ,4,[],[],metadataFile); image1 = tiffReader(typ,4,[],[],metadataFile);
...@@ -233,7 +233,7 @@ for i=1:7 ...@@ -233,7 +233,7 @@ for i=1:7
end end
tic tic
kernelName = 'OtsuThesholdValue'; kernelName = 'OtsuThresholdValue';
threshold = CudaMex(sprintf('%s',kernelName),image1,device); threshold = CudaMex(sprintf('%s',kernelName),image1,device);
fprintf('%s took %f sec and return a threshold of %f\n',kernelName,toc,double(threshold)); fprintf('%s took %f sec and return a threshold of %f\n',kernelName,toc,double(threshold));
clear imageOut; clear imageOut;
...@@ -262,7 +262,7 @@ for i=1:7 ...@@ -262,7 +262,7 @@ for i=1:7
tic tic
kernelName = 'ReduceImage'; kernelName = 'ReduceImage';
imageOut = CudaMex(sprintf('%s',kernelName),image1,[reductionFactorX,reductionFactorY,reductionFactorZ],'median',device); imageOut = CudaMex(sprintf('%s',kernelName),image1,[reductionFactorX,reductionFactorY,reductionFactorZ],'median',device);
fprintf('%s took %f sec\n',[kernelName ' median',toc); fprintf('%s took %f sec\n',[kernelName ' median'],toc);
if (showOut) if (showOut)
showIm(imageOut,[kernelName ' Median']); showIm(imageOut,[kernelName ' Median']);
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