Home › Forums › General Issues › Restoration of alpha on 3D VTK canvas › Reply To: Restoration of alpha on 3D VTK canvas

#69752

Hi Satoshi,

Indeed it doesn’t restore the alpha information for 3D Canvas (and so VTK 3D canvas). Looking at the source code, it looks like we already tried to preserve alpha information for 3D canvas but some reasons we commented it (long long time ago). I will try to re-introduce it for the next version checking if it have any edge effect..
Thanks for reporting the issue 🙂

In the meantime, you can use that small java-script to correctly load your colormap (not really convenient but it works):


importClass(Packages.icy.gui.dialog.OpenDialog)
importClass(Packages.icy.file.xml.XMLPersistentHelper)
importClass(Packages.icy.image.colormap.IcyColorMap)

// get all opened view
viewers = gui.getViewers()
// get LUT (look up table) from current view
lut = gui.getActiveLUT()

// current view exist ?
if (lut != null)
{
	f = OpenDialog.chooseFile()
	cm = new IcyColorMap("test")
	XMLPersistentHelper.loadFromXML(cm, f)
	// get LUT for first channel
	lutCh = lut.getLutChannel(0)
	// get colormap
	lutCh.setColorMap(cm, true)
}

Best,

– Stephane