-
sshimozon August 20, 2019 at 2:45 am
Hello,
I’m doing volume rendering (3D VTK canvas). It seems that the alpha of the saved colormap is not restored in 3D VTK canvas. When I loaded the colormap, the colormap including alpha was restored perfectly on 2D canvas, but on 3D VTK canvas, the alpha profile was lost. Am I doing something wrong?
I’m working with Icy 2.0.1.0 on macOS (Mojave 10.14.6)
Best regards,
Satoshi
Stephane Dallongeville August 21, 2019 at 11:32 amHi 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
- This reply was modified 5 years, 4 months ago by Stephane Dallongeville.
- This reply was modified 5 years, 4 months ago by Stephane Dallongeville.
sshimozon August 22, 2019 at 1:54 amDear Stephane,
Thank you for the code! I’ll try. I’m looking forward to seeing the next version incorporating the function?
Best regards,
Satoshi
sshimozon October 8, 2019 at 11:10 amDear Stephane,
According to the change log for Icy 2.0.2.0, the alpha channel loading for 3D is corrected. But I still cannot restored the alpha saved in the xml file. It seems that the alpha is taken over from the colormap which had been set before loading the new one.
The script you kindly gave me is working fine. Thank you! If it works for multi-channel (multi-colormap) data, it will be more convenient.
Thanks for your efforts,
Satoshi
Stephane Dallongeville October 8, 2019 at 12:05 pmHi Satoshi,
It looks like we accidentally didn’t committed the fix before releasing Icy 2.0.2.0 so indeed it doesn’t work.
It will be fixed for good in next version as i just committed the change now (so will be available in Icy 2.0.3.0), sorry for that :-/About having the script working for multi channel, it would be more difficult as currently LUT is saved only per channel basic into XML file, it would require to have a special script both for saving and loading.
Best,
– Stephane
sshimozon October 8, 2019 at 12:26 pmDear Stephane,
Thank you for quick reply. I will wait for the next release. Sorry for demanding much.
Best regards,
Satoshi
The forum ‘General Issues’ is closed to new topics and replies.