You can't modify the number of bands in a RasterElement after creation.
You can create a new RasterElement to hold the results and either set
one of the displayed bands (R G or B) in the raster layer to your new
RasterElement or create a new RasterLayer in the same view to display
the new RasterElement. (this is the usual pattern for similar algorithms
in opticks) You can alternately create a PseudocolorLayer (display
specific values with a specific color..use for thematic maps, etc.) or a
ThresholdLayer (display all pixels less than, greater than, between, or
outside specific value ranges as a bitmask)
From: WestSun [mailto:[hidden email]]
Sent: Tuesday, August 21, 2012 11:57 AM
To: [hidden email] Subject: [Opticks-devs] Can I add a new raster band in current view?
I want calculate all pixels's average value(a new raster band), and show
average band in current view.
I have not found sample in Opticks,So how can I do?