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

Fixed how loadImage uses the new brighten image from utils repo

parent 8bc577c7
No related branches found
No related tags found
No related merge requests found
%LOADIMAGE D3d.LoadImage( im, bufferNum, frameNumber, nonNormalized) %LOADIMAGE D3d.LoadImage( im, bufferNum, frameNumber, nonNormalized)
function im8 = LoadImage( im, bufferNum, frameNumber, dontNormalized ) function im8 = LoadImage( im, bufferNum, frameNumber, normalize )
global D3dIsOpen global D3dIsOpen
if (isempty(D3dIsOpen) || ~D3dIsOpen) if (isempty(D3dIsOpen) || ~D3dIsOpen)
error('You need to open the viewer before you can load images! Call D3d.Open first.'); error('You need to open the viewer before you can load images! Call D3d.Open first.');
...@@ -20,8 +20,8 @@ function im8 = LoadImage( im, bufferNum, frameNumber, dontNormalized ) ...@@ -20,8 +20,8 @@ function im8 = LoadImage( im, bufferNum, frameNumber, dontNormalized )
error('You can only load one frame at a time!'); error('You can only load one frame at a time!');
end end
if (~exist('nonNormalized','var') || isempty(dontNormalized)) if (~exist('nonNormalized','var') || isempty(normalize))
dontNormalized = false; normalize = true;
end end
bufferType = 'original'; bufferType = 'original';
...@@ -34,8 +34,8 @@ function im8 = LoadImage( im, bufferNum, frameNumber, dontNormalized ) ...@@ -34,8 +34,8 @@ function im8 = LoadImage( im, bufferNum, frameNumber, dontNormalized )
im = permute(im,[1,2,5,4,3]); im = permute(im,[1,2,5,4,3]);
end end
if (dontNormalized) if (~normalize)
im8 = ImUtils.ConvertType(im,'uint8'); im8 = ImUtils.ConvertType(im,'uint8',false);
else else
im8 = ImUtils.BrightenImages(im,'uint8'); im8 = ImUtils.BrightenImages(im,'uint8');
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment