setEnhancement with transparency

Errors and unexpected results
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

setEnhancement with transparency

Post by joleenf »

Hi,

It seems that with setEnhancement('colortable',range=(min,max),transparency=100), my color table will be set to 100% transparency for the remainder of the mcv session unless I use a setEnhancement with transparency=0. I don't find this option helpful, because in many cases, the min value is set to transparent in my color table and the remaining colors are opaque so that I don't see values which fall outside the range. One option I could use is to mask my data below a certain value, but it seems that I should be able to temporarily set a color table transparency to 100% when applied to a specific layer. Also, I might need some control over the lower breakpoint so that I can set just one value in the color table to transparent.

Thanks,
Joleen
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: setEnhancement with transparency

Post by joleenf »

Just and update, it seems that the mask works for setting values lower than the minimum value on the color table to nan. However, I still find the behavior of setting an enhancement with a transparency to a certain layer and having that transparency value persist to the next time it is applied to a different layer within the same session a bit odd.

Thanks,
Joleen
User avatar
bobc
Posts: 990
Joined: Mon Nov 15, 2010 5:57 pm

Re: setEnhancement with transparency

Post by bobc »

Hi Joleen -

Thanks for reporting this. I'm replicating your results. I created a color enhancement named 'Test' that had a range of 0-255, where 0 was 100% transparent interpolating to 200 that was 0% transparent. If I run setEnhancement('Test',range=(0,255),transparency=20), then 20% is used as the transparency value across the entire enhancement. Any time for the rest of the session that I try using this 'Test' enhancement, even without specifying a transparency value, the 20% transparency is used. I wrote this up as Inquiry 2153.

As far as working with individual breakpoints with transparency values, this is included in Inquiry 1900.

One quick note is in your first forum post you are setting the transparency to 100%. This is essentially just turning the layer off in the display, so an alternative way of doing this would be setLayerVisible(False).

Thanks again -
Bob Carp
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: setEnhancement with transparency

Post by joleenf »

I need to save the color bar on a transparent background, thus the use of a transparency rather than turning off the layer. I was not able to get the color table options from writeImage to work. I was not able to see any tick values with those options and being unable to set the font and font size was a limitation.

Thanks,
Joleen
Post Reply