Skip to content
Snippets Groups Projects
Commit bb658bcd authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Fixed flip function - matlab version problem

parent 70314d27
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,11 @@ classdef GtPSF < handle
psf_d = cast(psf_d, self.data_type);
% Let's find out whether they are symmetric or not
psf_a = flip(flip(psf_d, 1), 3);
if (verLessThan('matlab', '8.2.0'))
psf_a = flipdim(flipdim(psf_d, 1), 3); %#ok<DFLIPDIM>
else
psf_a = flip(flip(psf_d, 1), 3);
end
is_sym = all(abs(psf_d(:) - psf_a(:)) < eps('single'));
......
......@@ -97,9 +97,17 @@ function lsf_line = gtESF2LSF(img, varargin)
switch (conf.side)
case 'both'
case 'dark'
lsf(lsf_edge+2:end) = flip(lsf(1:lsf_edge));
if (verLessThan('matlab', '8.2.0'))
lsf(lsf_edge+2:end) = fliplr(lsf(1:lsf_edge));
else
lsf(lsf_edge+2:end) = flip(lsf(1:lsf_edge));
end
case 'bright'
lsf(1:lsf_edge) = flip(lsf(lsf_edge+2:end));
if (verLessThan('matlab', '8.2.0'))
lsf(1:lsf_edge) = fliplr(lsf(lsf_edge+2:end));
else
lsf(1:lsf_edge) = flip(lsf(lsf_edge+2:end));
end
end
lsf(lsf < 0) = 0;
if (~conf.keep_oversampling)
......
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