This is a static copy of a profile reportHome
tp_stretch3d (404 calls, 222.618 sec)
Generated 05-Nov-2014 07:52:41 using cpu time.
function in file /usr0/home/jenkins/workspace/cellorganizer-demo3D11-glnx64/utilities/3D/vesicles/3D/tp_stretch3d.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
53 | I = imresize(I,[size(I,1) zsiz... | 82820 | 206.906 s | 92.9% |  |
48 | I = squeeze(img(i,:,:)); | 82820 | 9.774 s | 4.4% |  |
54 | im2(i,:,:) = I; | 82820 | 4.857 s | 2.2% |  |
46 | im2 = zeros(size(img,1),size(i... | 404 | 0.651 s | 0.3% |  |
55 | end | 82820 | 0.401 s | 0.2% |  |
All other lines | | | 0.030 s | 0.0% |  |
Totals | | | 222.618 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
imresize | function | 82820 | 204.763 s | 92.0% |  |
squeeze | function | 82820 | 7.671 s | 3.4% |  |
Self time (built-ins, overhead, etc.) | | | 10.184 s | 4.6% |  |
Totals | | | 222.618 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 55 |
Non-code lines (comments, blank lines) | 40 |
Code lines (lines that can run) | 15 |
Code lines that did run | 9 |
Code lines that did not run | 6 |
Coverage (did run/can run) | 60.00 % |
Function listing
time calls line
1 function im2 = tp_stretch3d(img, zsize, method)
2 % TP_STRETCH3D resize a 3D stack along the z-direction using trilinear
3 % interpolation
4
5 % Author: Tao Peng
6 % Edited: Ivan E. Cao-Berg
7 % 6/11/13 D. Sullivan added support for multiple interpolation methods
8 %
9 % Copyright (C) 2011-2012 Murphy Lab
10 % Lane Center for Computational Biology
11 % School of Computer Science
12 % Carnegie Mellon University
13 %
14 % July 26, 2012 Devin S. Changed method to perform bilinear interpolation at resize
15 %
16 % This program is free software; you can redistribute it and/or modify
17 % it under the terms of the GNU General Public License as published
18 % by the Free Software Foundation; either version 2 of the License,
19 % or (at your option) any later version.
20 %
21 % This program is distributed in the hope that it will be useful, but
22 % WITHOUT ANY WARRANTY; without even the implied warranty of
23 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 % General Public License for more details.
25 %
26 % You should have received a copy of the GNU General Public License
27 % along with this program; if not, write to the Free Software
28 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
29 % 02110-1301, USA.
30 %
31 % For additional information visit http://murphylab.web.cmu.edu or
32 % send email to murphy@cmu.edu
33
34 %D. Sullivan 6/11/13 added method choice
404 35 if nargin<3
404 36 method = 'bilinear';
37 elseif isempty(method)
38 method = 'bilinear';
39 end
40
0.01 404 41 if size(img,3) == zsize
42 im2 = img;
43 return;
44 end
45
0.65 404 46 im2 = zeros(size(img,1),size(img,2),zsize);
404 47 for i = 1:size(img,1)
9.77 82820 48 I = squeeze(img(i,:,:));
49 %devins 26/7/2012
50 %I = imresize(I,[size(I,1) zsize]);
51 %D. Sullivan 6/11/13 added method choice
52 % I = imresize(I,[size(I,1) zsize],'bilinear');
206.91 82820 53 I = imresize(I,[size(I,1) zsize],method);
4.86 82820 54 im2(i,:,:) = I;
0.40 82820 55 end