10-01-2016 12:26 PM
I built a SMART M.APP using an analytical recipe. The last operator is a Raster Ouput, that create a u1 thematic raster. When I test it, the output is correct but I can't manage the pixel transparency.
The color table is like this:
0 - dark
1 - red
I would like to see only red pixels.
In the raster Ouput operato I set NoData Value = Integer(0)
In ERDAS IMAGINE I did it changing manually the Opacity value in the raster attribute table or, for the preview, using raster to bitmap operator.
Solved! Go to Solution.
10-03-2016 01:32 AM
There are two possible options how you can do it:
1. First one is adding the Opacity column to the raster through Create Column(s) operator with following parameters: Attrbute Name - Opacity, Table Type - Float and Custom Table Input operator as Attribute Value.
In a Custom Table Input you should specify the size (if 8 bit image, so 256 rows), where the first row will have vallue of 0.
2. Second option seems to me more flexible.
The same idea here, just in Custom Table Input is enough to specify two rows with two values:
So not important what is the Pixel Type of your image, the first row will have Opacity of 0.
Post-Sales Engineer Remote Sensing
Hexagon Geospatial Division
10-03-2016 01:41 AM
Thank you very much Marina!
I tried a similar solution but it creates a column named 'opacity(new)' because the attribute table of the raster has already an opacity column.
Maybe I was wrong with some operators, I will with your models.
10-03-2016 02:02 AM
It creates new Opacity column, when you specify Table Type as Integer.
While it should be Float.
10-03-2016 03:09 AM
I tried different ways. Now it works:
The 0,1 Float Table for the Opacity is the one one the right. The first on the left is for colors.
Thank you for your help!!!
10-17-2017 01:55 AM
Not sure if that is what you are looking for. If not, please clarify more your question.
You can set the value needed to be NoData, therefore transparent, with the help of Set to NoData operator. For this you should carefully read the following article http://community.hexagongeospatial.com/t5/Spatial-Recipes/Handling-NoData-in-Spatial-Modeler/ta-p/95... as well as the comment from Ian below it.
If you need to set the range of values to be NoData, so you can do it with Either/Or operator by setting some range to have 0 value. Then specify 0 as NoData in Raster Output operator.