Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Specify colormap for implay without using the gui

466 views
Skip to first unread message

Hannes

unread,
Sep 14, 2009, 8:59:03 AM9/14/09
to
I need to use implay to view a number of image sequences. They all have different pixel values and need different colormaps. I know I can use the GUI to set the min/max values for the colormap once the sequence has loaded.
But that is really inefficient compared to giving the colormap on the commandline.

So, the question is:
Can I programmatically (from the commandline) give implay a colormap to use?

Fab Braun

unread,
Oct 8, 2009, 9:51:03 AM10/8/09
to
"Hannes " <kig...@gmail.com> wrote in message <h8lemm$78l$1...@fred.mathworks.com>...

hi hannes!

i'm having exactly the same problem...did you already find a workaround or fix for this issue?

thanks!
fab

Fab Braun

unread,
Oct 8, 2009, 9:52:03 AM10/8/09
to
"Hannes " <kig...@gmail.com> wrote in message <h8lemm$78l$1...@fred.mathworks.com>...

hi hannes!

Evan Boote

unread,
Oct 15, 2009, 4:52:03 PM10/15/09
to
I too, am having the same error message. I am using immovie to convert an US data set to play in an 'implay' window. The same error occurs with both Windows and Mac OSX.
The command window stream is below:

??? Error using ==> getappdata
Too many output arguments.

Error in ==> uimgr.getappdata at 53
[y{i},foundData(i)] = getappdata(hNode,name{i});

Error in ==> uimgr.uipushtool.uipushtool>createUIPushTool at 39
set(hWidget,'cdata',uimgr.getappdata(hThis,hThis.iconAppData));

Error in ==> uimgr.uipushtool.uipushtool>@(hThis)createUIPushTool(hThis) at 24
h.WidgetFcn = @(hThis)createUIPushTool(hThis);

Error in ==> uimgr.uiitem.render_widget at 50
theWidget = WidgetFcn(h);

Error in ==> uimgr.uiitem.render at 26
render_widget(h);

Error in ==> renderCore at 109
render(hChild, childGraphicalParent);

Error in ==> uimgr.uigroup.render at 8
renderCore(h,varargin{:});

Error in ==> renderCore at 109
render(hChild, childGraphicalParent);

Error in ==> uimgr.uigroup.render at 8
renderCore(h,varargin{:});

Error in ==> renderCore at 109
render(hChild, childGraphicalParent);

Error in ==> uimgr.uigroup.render at 8
renderCore(h,varargin{:});

Error in ==> uiscopes.Framework.Framework>localRender at 432
render(this.UIMgr);

Error in ==> uiscopes.Framework.Framework at 104
localRender(this);

Error in ==> uiscopes.new at 22
hScope = uiscopes.Framework(hScopeCfg, varargin{:});

Error in ==> implay at 55
obj = uiscopes.new(hScopeCfg);

omegayen

unread,
Dec 10, 2010, 1:38:05 PM12/10/10
to
"Hannes " <kig...@gmail.com> wrote in message <h8lemm$78l$1...@fred.mathworks.com>...

I would like to do this as well. was this ever addressed?

Martin

unread,
Jul 19, 2012, 11:42:54 AM7/19/12
to
"Hannes " <kig...@gmail.com> wrote in message <h8lemm$78l$1...@fred.mathworks.com>...
I had the need for the same thing and after reading your post explored the properties of the implay object and her is what I came up with. I created an function that creates and implay object and sets the appropriate properties programmatically. Here is the source code of my function:

function [handle] = ImplayWithMap(frames, fps, limits)
%ImplayWithMap Calls the implay function and adjust the color map
% Call it with 3 parameters:
% ImplayWithMap(frames, fps, limits)
% frames - 4D arrray of images
% fps - frame rate
% limits - an array of 2 elements, specifying the lower / upper
% of the liearly mapped colormap
% Returns a nadle to the player
%
% example:
% h = ImplayWithMap(MyFrames, 30, [10 50])


handle = implay(frames, fps);
handle.Visual.ColorMap.UserRangeMin = limits(1);
handle.Visual.ColorMap.UserRangeMax = limits(2);
handle.Visual.ColorMap.UserRange = 1;



I work with grayscale images so this works for me. Not sure if it will work with RGB images.

Martin

Daniel Hornung

unread,
Feb 7, 2013, 1:24:08 PM2/7/13
to
> handle = implay(frames, fps);
> handle.Visual.ColorMap.UserRangeMin = limits(1);
> handle.Visual.ColorMap.UserRangeMax = limits(2);
> handle.Visual.ColorMap.UserRange = 1;
>
>
>
> I work with grayscale images so this works for me. Not sure if it will work with RGB images.

This works to change the colormap:

handle.Visual.ColorMap.MapExpression = 'jet';
0 new messages