Re: API way to set channel LUT in composite image. [SOLVED]
I found the answer to this problem.
My mistake was that I did not realize that
compFused = CompositeImage(fusedImp)
creates a separate image. I thought (incorrectly) that it was the same
image, just with teh composite methods added.
Since it is a new image, I needed to run show() to display it.
adding compFused.show() displayed the new image with the correct LUTs.
On 23/08/2018 12:40, Aryeh Weiss wrote:
> I am trying to do set the LUt of a channel (actually, three of them)
> for a composite image.
> IJ.run(fusedImp, "Grays", "")
> IJ.run(fusedImp, "Red", "")
> IJ.run(fusedImp, "Green", "")
> Above is a way that works. However, it means that the image (which is
> large) updates with each IJ.run call,
> I tries the following:
> compFused = CompositeImage(fusedImp)
> compFused.setChannelLut(LUT.createLutFromColor(Color.GRAY), 1)
> compFused.setChannelLut(LUT.createLutFromColor(Color.RED), 2)
> compFused.setChannelLut(LUT.createLutFromColor(Color.GREEN), 3)
> for i in compFused.getLuts():
> print i
> but although the correct LUTs print out, the image is unchanged.
> What am I missing?
> Tnx in advance
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
> Ph: 972-3-5317638
> FAX: 972-3-7384051
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel