25 #ifndef __TERRALIB_RP_INTERNAL_SEGMENTER_H
26 #define __TERRALIB_RP_INTERNAL_SEGMENTER_H
35 #include "../raster/RasterSynchronizer.h"
36 #include "../common/progress/TaskProgress.h"
278 const unsigned int minExapandedBlockPixels,
279 const unsigned int maxExapandedBlockPixels,
280 unsigned int& blocksHOverlapSize,
281 unsigned int& blocksVOverlapSize,
282 unsigned int& nonExpandedBlockWidth,
283 unsigned int& nonExpandedBlockHeight,
284 unsigned int& expandedBlockWidth,
285 unsigned int& expandedBlockHeight )
const;
306 const std::vector< unsigned int >& inRasterBands,
307 const unsigned int pixelNeighborhoodSize,
308 const unsigned int tileNeighborhoodSize,
309 const unsigned int profileAntiSmoothingFactor,
310 std::vector< unsigned int>& profile )
const;
325 const std::vector< unsigned int >& inRasterBands,
326 const unsigned int pixelNeighborhoodSize,
327 const unsigned int tileNeighborhoodSize,
328 const unsigned int profileAntiSmoothingFactor,
329 std::vector< unsigned int>& profile )
const;
339 const std::vector< std::vector< unsigned int> >& imageHorizontalProfiles,
340 const std::vector< std::vector< unsigned int> >& imageVerticalProfiles,
344 const std::vector< std::vector< unsigned int> >& imageHorizontalProfiles,
345 const std::vector< unsigned int >& imageHorizontalProfilesCenterLines,
346 const std::vector< std::vector< unsigned int> >& imageVerticalProfiles,
347 const std::vector< unsigned int >& imageVerticalProfilesCenterLines,
348 const std::string& filename );
Raster segmenter strategy parameters base class.
Raster segmenter strategy base class.
Raster Processing algorithm output parameters base interface.
Raster Processing algorithm base interface.
A generic template matrix.
Segmenter segments IDs manager.
Segmenter segments block description class.
Segmenter Strategy Parameters.
Segmenter Output Parameters.
std::unique_ptr< te::rst::Raster > m_outputRasterPtr
A pointer the ge generated output raster (label image).
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state.
const Segmenter::OutputParameters & operator=(const Segmenter::OutputParameters ¶ms)
OutputParameters(const OutputParameters &other)
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
std::map< std::string, std::string > m_rInfo
The necessary information to create the raster (as described in te::raster::RasterFactory).
AbstractParameters * clone() const
Create a clone copy of this instance.
The parameters passed to the Segmenter::segmenterthreadEntry method.
std::vector< std::complex< double > > m_inputRasterBandMaxValues
A vector of input raster bands maximum values.
boost::mutex * m_generalMutexPtr
Pointer to a general global mutex (default:0).
SegmenterIdsManager * m_segmentsIdsManagerPtr
Pointer to the segments Ids manager - (default 0).
bool volatile * m_abortSegmentationFlagPtr
Pointer to the abort segmentation flag (default:0).
te::rst::RasterSynchronizer * m_outputRasterSyncPtr
Pointer to the output raster synchronizer (default:0).
unsigned int m_maxInputRasterCachedBlocks
The maximum number of input raster cached blocks per-thread.
bool m_enableStrategyProgress
Enable/Disable the segmentation strategy to use its own progress interface (default:false).
boost::mutex * m_blockProcessedSignalMutexPtr
Pointer to the mutex used by the block processed signal (default:0).
boost::condition_variable * m_blockProcessedSignalPtr
Pointer to a signal to be emited when a segments block was processed (default:0).
~SegmenterThreadEntryParams()
te::rst::RasterSynchronizer * m_inputRasterSyncPtr
Pointer to the input raster synchronizer (default:0).
unsigned int volatile * m_runningThreadsCounterPtr
Pointer to the running threads counter - default 0).
Segmenter::InputParameters m_inputParameters
The global segmenter input execution parameters.
std::vector< std::complex< double > > m_inputRasterNoDataValues
A vector of values to be used as input raster no-data values.
std::string * m_threadErrorMessagePtr
A pointer to a string where the thread error message will be stored.
Segmenter::OutputParameters * m_outputParametersPtr
A pointer to the global segmenter input execution parameters (default:0).
SegmenterThreadEntryParams()
SegmentsBlocksMatrixT * m_segsBlocksMatrixPtr
Pointer to the segments blocks matrix (default:0).
std::vector< std::complex< double > > m_inputRasterBandMinValues
A vector of input raster bands minimum values.
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
bool genImageVCutOffProfile(const unsigned int profileCenter, const te::rst::Raster &inRaster, const std::vector< unsigned int > &inRasterBands, const unsigned int pixelNeighborhoodSize, const unsigned int tileNeighborhoodSize, const unsigned int profileAntiSmoothingFactor, std::vector< unsigned int > &profile) const
Generate the vertical cutOff prifles for the entire image..
bool isInitialized() const
Returns true if the algorithm instance is initialized and ready for execution.
bool createCutOffLinesTiff(const std::vector< std::vector< unsigned int > > &imageHorizontalProfiles, const std::vector< unsigned int > &imageHorizontalProfilesCenterLines, const std::vector< std::vector< unsigned int > > &imageVerticalProfiles, const std::vector< unsigned int > &imageVerticalProfilesCenterLines, const std::string &filename)
void reset()
Clear all internal allocated objects and reset the algorithm to its initial state.
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
bool genImageHCutOffProfile(const unsigned int profileCenter, const te::rst::Raster &inRaster, const std::vector< unsigned int > &inRasterBands, const unsigned int pixelNeighborhoodSize, const unsigned int tileNeighborhoodSize, const unsigned int profileAntiSmoothingFactor, std::vector< unsigned int > &profile) const
Generate the horizontal cutOff prifles for the entire image..
static void segmenterThreadEntry(SegmenterThreadEntryParams *paramsPtr)
Segmenter thread entry.
Segmenter::InputParameters m_inputParameters
Segmenter execution parameters.
te::rp::Matrix< SegmenterSegmentsBlock > SegmentsBlocksMatrixT
bool calcBestBlockSize(const unsigned int minExapandedBlockPixels, const unsigned int maxExapandedBlockPixels, unsigned int &blocksHOverlapSize, unsigned int &blocksVOverlapSize, unsigned int &nonExpandedBlockWidth, unsigned int &nonExpandedBlockHeight, unsigned int &expandedBlockWidth, unsigned int &expandedBlockHeight) const
Calc the best sub-image block size for each thread to process.
bool updateBlockCutOffProfiles(const std::vector< std::vector< unsigned int > > &imageHorizontalProfiles, const std::vector< std::vector< unsigned int > > &imageVerticalProfiles, SegmenterSegmentsBlock &segmentsBlock) const
Update the block cutOff profiles using the full image profiles.
bool m_instanceInitialized
An access synchronizer to be used in SynchronizedRaster raster instances.
An abstract class for raster data strucutures.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).