Skip to content
Snippets Groups Projects
Commit 93823ad6 authored by Patrick Imbo's avatar Patrick Imbo
Browse files

BUG: improve the GetDefaultDisplay() mehtod -> now process any number of bands

parent 42c98ae5
No related branches found
No related tags found
No related merge requests found
......@@ -151,13 +151,23 @@ public:
}
/** Get the 3 spectral band numbers corresponding to the default display for visualization,
* in the order R, G, B */
* in the order R, G, B.
*
* Nota : When two spectral bands are available: first band is given to the R and B channel
* When one spectral band is available : the only band is given to the R, G and B channel.
*
*/
std::vector<unsigned int> GetDefaultDisplay() const
{
unsigned int i = 0;
std::vector<unsigned int> rgb(3);
rgb[0] = 0;
rgb[1] = 1;
rgb[2] = 2;
while( i <this->GetNumberOfBands() || i < 3 )
{
rgb[i] = i;
++i;
}
return rgb;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment