cpp:max-tree
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cpp:max-tree [2022/06/22 13:33] – francois | cpp:max-tree [2022/07/01 12:09] (current) – francois | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Il est possible d' | Il est possible d' | ||
| - | Ce programme prend 3 arguments | + | |
| + | |||
| + | <WRAP center round download 60%> | ||
| + | Voici un exemple tiré des sources {{ : | ||
| + | </ | ||
| + | Ce programme prend 3 arguments | ||
| * le nom du fichier contenant l' | * le nom du fichier contenant l' | ||
| * le nom du fichier qui contiendra l' | * le nom du fichier qui contiendra l' | ||
| Line 48: | Line 53: | ||
| <code c++> | <code c++> | ||
| static const int GeoDimT (2); | static const int GeoDimT (2); | ||
| - | static TreeType treeType = MAX; | + | static |
| </ | </ | ||
| Line 83: | Line 88: | ||
| inputImage.readImage (); | inputImage.readImage (); | ||
| // get image size (width x height) | // get image size (width x height) | ||
| - | Size< | + | |
| IImage< | IImage< | ||
| Line 91: | Line 96: | ||
| </ | </ | ||
| - | Enfin nous réalisons le traitement en appelant | + | Enfin nous réalisons le traitement en invoquant |
| <code c++> | <code c++> | ||
| switch (inputImage.getDataType ()) { | switch (inputImage.getDataType ()) { | ||
| Line 134: | Line 139: | ||
| Raster< | Raster< | ||
| // true image size (width x height) | // true image size (width x height) | ||
| - | Size< | + | |
| // read first band (0) in 2D mode from origine [0,0] to end [width, height]. | // read first band (0) in 2D mode from origine [0,0] to end [width, height]. | ||
| inputImage.readBand (raster, 0, NullPoint2D, | inputImage.readBand (raster, 0, NullPoint2D, | ||
| Line 143: | Line 148: | ||
| <code c++> | <code c++> | ||
| // no border (i.e. all pixels are take in account) | // no border (i.e. all pixels are take in account) | ||
| - | Border< | + | |
| // neighbors take in account (default connectivity C4) | // neighbors take in account (default connectivity C4) | ||
| - | GraphWalker< | + | |
| // tree builder base on raster, connectivity and type of tree | // tree builder base on raster, connectivity and type of tree | ||
| ArrayTreeBuilder< | ArrayTreeBuilder< | ||
| Line 168: | Line 173: | ||
| <code c++> | <code c++> | ||
| // create area attribute | // create area attribute | ||
| - | AreaAttributes< | + | |
| </ | </ | ||
| Line 174: | Line 179: | ||
| <code c++> | <code c++> | ||
| // output channels count | // output channels count | ||
| - | DimChannel outputChannelCount (thresholds.size ()); | + | |
| // number of pixels (width x height) | // number of pixels (width x height) | ||
| - | DimImg pixelsCount (size.getPixelsCount ()); | + | |
| </ | </ | ||
cpp/max-tree.1655904796.txt.gz · Last modified: by francois