Code covered by the BSD License  

Highlights from
HDR image viewer for Deep Color Monitor

image thumbnail

HDR image viewer for Deep Color Monitor

by

 

29 Mar 2010 (Updated )

Display your captured image from within MATLAB on a Deep Color monitor with HDR quality

HdrImgView
function [axDeepColor] = HdrImgView

NvGlFigurePos = get(0,'DefaultFigurePosition');
hNvGlFigure = figure('WindowStyle', 'docked',...
                     'DoubleBuffer', 'off',...
                     'ResizeFcn', {@figResize NvGlFigurePos(3)},...
                     'DeleteFcn',@figDelete);
%                 
ctrlSize = calcSize;
%
axDeepColor = actxcontrol('HdrImgViewCtrl.HdrImgView.1', ctrlSize, hNvGlFigure);
%axDeepColor.LoadFile('DeepColorTest.exr');
axDeepColor.LoadFile('CT-MONO2-16-ankle.dcm');
axDeepColor.Exposure = 17.127;
axDeepColor.Gamma = -0.00127;
axDeepColor.Info = true;
axDeepColor.Histogram = true;
%
ctrlSize = calcSize;
move(axDeepColor,ctrlSize);


% Calculate size of control container
% based on size of figure
   function ctrlSize = calcSize
      fp = get(hNvGlFigure,'Position');
      ctrlSize = fp([3 4 3 4]).*[0 0 1 1];
   end % conSize

% Figure resize function
   function figResize(src,evnt,dfp)
      if ~exist('axDeepColor','var')
         return
      end
      % Resize container
      ctrlSize = calcSize;
      move(axDeepColor,ctrlSize);
   end % reSize
% Figure delete function
   function figDelete(src,evnt)
      axDeepColor.delete;
   end
end

Contact us