#include <lccanalyzer.h>
Public Member Functions | |
| LCCAnalyzer () | |
| Constructor. | |
| virtual | ~LCCAnalyzer () |
| Destructor. | |
| dtCore::RefPtr< osg::Image > | MakeBaseLCCColor (const HeightField &hf, int latitude, int longitude) |
| Makes the base color texture map for the specified heightfield. | |
| dtCore::RefPtr< osg::Image > | MakeLCCMask (const osg::Image &src_image, unsigned char r, unsigned char g, unsigned char b) |
| Creates a mask image based on this LCC type where a hit corresponds to a black pixel and white corresponds to a miss. | |
| void | LCCHistogram (const osg::Image &LCCbase, const osg::Image &image, const std::string &fileName, int binsize) |
| Buggy "histogram" of an image by a particular LCC type. | |
| dtCore::RefPtr< osg::Image > | MakeCombinedImage (dtTerrain::LCCType &l, const HeightField &hf, const osg::Image &f_image, const osg::Image &s_image, const osg::Image &r_image) |
| Create probability map of the likehihood for a particular LCC type. | |
| dtCore::RefPtr< osg::Image > | GenerateBaseFilterImage (LCCType &type, const std::string &tileCachePath) |
| bool | CheckBaseLCCImages (const HeightField &hf, int latitude, int longitude, const std::string &tileCachePath) |
| void | CheckSlopeAndElevationMaps (const HeightField &hf, const std::string &tileCachePath) |
| bool | ProcessLCCData (const PagedTerrainTile &tile, LCCType &type) |
| void | ComputeProbabilityMap (const HeightField &hf, LCCType &type, int latitude, int longitude, const std::string &tileCachePath) |
| void | AddGeospecificImage (const std::string &fileName) |
| Adds a geospecific image to the LCC analyzers list of geo images. | |
| bool | IsGeoSpecificLCCImageLoaded (const std::string &fileName) |
| Checks the list of currently loaded images to see if the specified image has already been loaded and processed. | |
| void | LoadAllGeoSpecificImages () |
| Makes sure all the geospecific images that have been added to the analyzer are loaded and ready for use in the LCC data processing. | |
| bool | OutputDebugImages () |
| Gets whether or not inter-process images processed during LCC analysis are saved for review. | |
| void | SetOutputDebugImages (bool value) |
| Sets whether or not inter-process images processed during LCC analysis are saved for review. | |
| void | SetMaxImageSize (unsigned int newSize) |
| Sets the maximum size of the images constructed during LCC analysis. | |
| unsigned int | GetImageSize () const |
| Gets the current maximum image size used during LCC analysis. | |
| void | Clear () |
| Clears all data cached in this analyzer. | |
| dtTerrain::LCCAnalyzer::LCCAnalyzer | ( | ) |
Constructor.
| dtTerrain::LCCAnalyzer::~LCCAnalyzer | ( | ) | [virtual] |
Destructor.
| dtCore::RefPtr< osg::Image > dtTerrain::LCCAnalyzer::MakeBaseLCCColor | ( | const HeightField & | hf, | |
| int | latitude, | |||
| int | longitude | |||
| ) |
Makes the base color texture map for the specified heightfield.
| hf | the heightfield to process | |
| latitude | the latitude of the terrain segment | |
| longitude | the longitude of the terrain segment |
| dtCore::RefPtr< osg::Image > dtTerrain::LCCAnalyzer::MakeLCCMask | ( | const osg::Image & | src_image, | |
| unsigned char | r, | |||
| unsigned char | g, | |||
| unsigned char | b | |||
| ) |
Creates a mask image based on this LCC type where a hit corresponds to a black pixel and white corresponds to a miss.
| src_image | Image containing LCC coloration data. | |
| r | Red pixel color value with which to create the mask. | |
| g | Green pixel color value with which to create the mask. | |
| b | Blue pixel color value with which to create the mask. |
| void dtTerrain::LCCAnalyzer::LCCHistogram | ( | const osg::Image & | LCCbase, | |
| const osg::Image & | image, | |||
| const std::string & | fileName, | |||
| int | binsize | |||
| ) |
Buggy "histogram" of an image by a particular LCC type.
| LCCbase | the black/white LCC image of picked points of a particular LCC type | |
| image | the slopemap, heightmap, or relative elevation | |
| fileName | the filename to save the histogram data | |
| binsize | the sampling size of the image (i.e. the delta height or slope). |
| dtCore::RefPtr< osg::Image > dtTerrain::LCCAnalyzer::MakeCombinedImage | ( | dtTerrain::LCCType & | l, | |
| const HeightField & | hf, | |||
| const osg::Image & | f_image, | |||
| const osg::Image & | s_image, | |||
| const osg::Image & | r_image | |||
| ) |
Create probability map of the likehihood for a particular LCC type.
| l | The LCC type to calculate probabilities for. | |
| hf | The heightfield. | |
| f_image | The masked LCC image containing placement statistics. | |
| s_image | the slopemap image | |
| r_image | the relative elevation image |
| dtCore::RefPtr< osg::Image > dtTerrain::LCCAnalyzer::GenerateBaseFilterImage | ( | LCCType & | type, | |
| const std::string & | tileCachePath | |||
| ) |
| bool dtTerrain::LCCAnalyzer::CheckBaseLCCImages | ( | const HeightField & | hf, | |
| int | latitude, | |||
| int | longitude, | |||
| const std::string & | tileCachePath | |||
| ) |
| void dtTerrain::LCCAnalyzer::CheckSlopeAndElevationMaps | ( | const HeightField & | hf, | |
| const std::string & | tileCachePath | |||
| ) |
| bool dtTerrain::LCCAnalyzer::ProcessLCCData | ( | const PagedTerrainTile & | tile, | |
| LCCType & | type | |||
| ) |
| void dtTerrain::LCCAnalyzer::ComputeProbabilityMap | ( | const HeightField & | hf, | |
| LCCType & | type, | |||
| int | latitude, | |||
| int | longitude, | |||
| const std::string & | tileCachePath | |||
| ) |
| void dtTerrain::LCCAnalyzer::AddGeospecificImage | ( | const std::string & | fileName | ) | [inline] |
Adds a geospecific image to the LCC analyzers list of geo images.
There must be at least one valid LCC geospecific image in this list, else an exception will be thrown while processing LCC types.
| filename | The name of the geospecific resource. |
| bool dtTerrain::LCCAnalyzer::IsGeoSpecificLCCImageLoaded | ( | const std::string & | fileName | ) |
Checks the list of currently loaded images to see if the specified image has already been loaded and processed.
| fileName | The filename of the image. |
| void dtTerrain::LCCAnalyzer::LoadAllGeoSpecificImages | ( | ) |
Makes sure all the geospecific images that have been added to the analyzer are loaded and ready for use in the LCC data processing.
| bool dtTerrain::LCCAnalyzer::OutputDebugImages | ( | ) | [inline] |
Gets whether or not inter-process images processed during LCC analysis are saved for review.
| void dtTerrain::LCCAnalyzer::SetOutputDebugImages | ( | bool | value | ) | [inline] |
Sets whether or not inter-process images processed during LCC analysis are saved for review.
| value | True if images should be saved, false otherwise. |
| void dtTerrain::LCCAnalyzer::SetMaxImageSize | ( | unsigned int | newSize | ) | [inline] |
Sets the maximum size of the images constructed during LCC analysis.
| newSize | The size in pixels of the image. |
| unsigned int dtTerrain::LCCAnalyzer::GetImageSize | ( | ) | const [inline] |
Gets the current maximum image size used during LCC analysis.
| void dtTerrain::LCCAnalyzer::Clear | ( | ) | [inline] |
Clears all data cached in this analyzer.
This should be called before processing a different tile or region.