Overview
Forum
Mango
iMango
Papaya
Multi-image Analysis GUI
Board Index
Register
Login
Logout
Settings

refresh image after changing custom color table

Questions or comments about Mango, webMango, iMango or Papaya.

Moderator: Michael Martinez

refresh image after changing custom color table

Postby gamaliz » Thu Apr 05, 2018 1:26 pm

Hi,

I wrote javascript code which creates a dynamic color table. There is an array in memory which is ready by the prototype.lookupBlue = function (screenVal, a) type functions. After i change the array the colors change, but only after I click two of the volume views. Is there a function I can call to refresh the viewer without having to click on it? The only thing that comes close is this from the API
papaya.Container.showImage(index, imageIndex)
(I haven't really tried it yet :/ ) ... I wonder if I can just call something that will just draw the new colors.
gamaliz
 
Posts: 24
Joined: Fri Aug 07, 2015 10:44 am

Re: refresh image after changing custom color table

Postby admin » Sat Apr 07, 2018 7:51 pm

There's not an obvious call in the API yet for this, but showImage() is pretty close. You can just use this:

Code: Select all
papayaContainers[index].viewer.drawViewer();


If you only one one viewer on the screen, then index=0. If you don't see it updated as expected, pass in argument of value true...

Code: Select all
papayaContainers[index].viewer.drawViewer(true);


... which will force it to update everything.
admin
Site Admin
 
Posts: 47
Joined: Fri Jul 06, 2007 8:18 am
Location: Research Imaging Center

Re: refresh image after changing custom color table

Postby gamaliz » Sat Apr 07, 2018 7:55 pm

Michael

I am just going to say, thanks :)
gamaliz
 
Posts: 24
Joined: Fri Aug 07, 2015 10:44 am


Return to Mango

Who is online

Users browsing this forum: No registered users and 1 guest

cron