SourceXtractorPlusPlus  0.13
Please provide a description of the project.
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SourceXtractor::SegmentationConfig Class Reference

Used to select a Segmentation algorithm. More...

#include <SegmentationConfig.h>

Inheritance diagram for SourceXtractor::SegmentationConfig:
[legend]
Collaboration diagram for SourceXtractor::SegmentationConfig:
[legend]

Public Types

enum  Algorithm { Algorithm::UNKNOWN, Algorithm::LUTZ, Algorithm::BFS }
 
- Public Types inherited from Euclid::Configuration::Configuration
enum  State { State::CONSTRUCTED, State::PRE_INITIALIZED, State::INITIALIZED, State::FINAL }
 
typedef std::vector< boost::program_options::option_description > OptionDescriptionList
 
typedef std::map< std::string, boost::program_options::variable_value > UserValues
 

Public Member Functions

virtual ~SegmentationConfig ()=default
 Destructor. More...
 
 SegmentationConfig (long manager_id)
 Constructs a new SegmentationConfig object. More...
 
std::map< std::string, Configuration::OptionDescriptionListgetProgramOptions () override
 
void preInitialize (const UserValues &args) override
 
void initialize (const UserValues &args) override
 
Algorithm getAlgorithmOption () const
 
int getLutzWindowSize () const
 
int getBfsMaxDelta () const
 
bool isFilteringEnabled () const
 
std::shared_ptr< DetectionImageFrame::ImageFiltergetFilter () const
 
- Public Member Functions inherited from Euclid::Configuration::Configuration
 Configuration (long manager_id)
 
virtual ~Configuration ()=default
 
virtual void postInitialize (const UserValues &args)
 
const std::set< std::type_index > & getDependencies ()
 
StategetCurrentState ()
 
State getCurrentState () const
 

Private Member Functions

std::shared_ptr< DetectionImageFrame::ImageFiltergetDefaultFilter () const
 
std::shared_ptr< DetectionImageFrame::ImageFilterloadFilter (const std::string &filename) const
 
std::shared_ptr< DetectionImageFrame::ImageFilterloadFITSFilter (const std::string &filename) const
 
std::shared_ptr< DetectionImageFrame::ImageFilterloadASCIIFilter (const std::string &filename) const
 

Private Attributes

Algorithm m_selected_algorithm
 
std::shared_ptr< DetectionImageFrame::ImageFilterm_filter
 
int m_lutz_window_size
 
int m_bfs_max_delta
 

Additional Inherited Members

- Protected Member Functions inherited from Euclid::Configuration::Configuration
void declareDependency ()
 
T & getDependency ()
 
const T & getDependency () const
 

Detailed Description

Used to select a Segmentation algorithm.

Definition at line 36 of file SegmentationConfig.h.

Member Enumeration Documentation

◆ Algorithm

Enumerator
UNKNOWN 
LUTZ 
BFS 

Definition at line 39 of file SegmentationConfig.h.

Constructor & Destructor Documentation

◆ ~SegmentationConfig()

virtual SourceXtractor::SegmentationConfig::~SegmentationConfig ( )
virtualdefault

Destructor.

◆ SegmentationConfig()

SourceXtractor::SegmentationConfig::SegmentationConfig ( long  manager_id)

Constructs a new SegmentationConfig object.

Definition at line 56 of file SegmentationConfig.cpp.

Member Function Documentation

◆ getAlgorithmOption()

Algorithm SourceXtractor::SegmentationConfig::getAlgorithmOption ( ) const
inline

Definition at line 57 of file SegmentationConfig.h.

References m_selected_algorithm.

◆ getBfsMaxDelta()

int SourceXtractor::SegmentationConfig::getBfsMaxDelta ( ) const
inline

Definition at line 65 of file SegmentationConfig.h.

References m_bfs_max_delta.

◆ getDefaultFilter()

std::shared_ptr< DetectionImageFrame::ImageFilter > SourceXtractor::SegmentationConfig::getDefaultFilter ( ) const
private

Definition at line 106 of file SegmentationConfig.cpp.

References SourceXtractor::VectorImage< T >::create(), Elements::Logging::info(), and SourceXtractor::segConfigLogger.

Referenced by preInitialize().

Here is the call graph for this function:

◆ getFilter()

std::shared_ptr<DetectionImageFrame::ImageFilter> SourceXtractor::SegmentationConfig::getFilter ( ) const
inline

Definition at line 73 of file SegmentationConfig.h.

References m_filter.

◆ getLutzWindowSize()

int SourceXtractor::SegmentationConfig::getLutzWindowSize ( ) const
inline

Definition at line 61 of file SegmentationConfig.h.

References m_lutz_window_size.

◆ getProgramOptions()

std::map< std::string, Configuration::OptionDescriptionList > SourceXtractor::SegmentationConfig::getProgramOptions ( )
overridevirtual

Reimplemented from Euclid::Configuration::Configuration.

Definition at line 60 of file SegmentationConfig.cpp.

References std::string::c_str(), SourceXtractor::SEGMENTATION_ALGORITHM, SourceXtractor::SEGMENTATION_BFS_MAX_DELTA, SourceXtractor::SEGMENTATION_DISABLE_FILTERING, SourceXtractor::SEGMENTATION_FILTER, and SourceXtractor::SEGMENTATION_LUTZ_WINDOW_SIZE.

Here is the call graph for this function:

◆ initialize()

void SourceXtractor::SegmentationConfig::initialize ( const UserValues args)
overridevirtual

Reimplemented from Euclid::Configuration::Configuration.

Definition at line 103 of file SegmentationConfig.cpp.

◆ isFilteringEnabled()

bool SourceXtractor::SegmentationConfig::isFilteringEnabled ( ) const
inline

Definition at line 69 of file SegmentationConfig.h.

References m_filter.

◆ loadASCIIFilter()

std::shared_ptr< DetectionImageFrame::ImageFilter > SourceXtractor::SegmentationConfig::loadASCIIFilter ( const std::string filename) const
private

◆ loadFilter()

std::shared_ptr< DetectionImageFrame::ImageFilter > SourceXtractor::SegmentationConfig::loadFilter ( const std::string filename) const
private

Definition at line 124 of file SegmentationConfig.cpp.

References conf::filename, std::string::length(), loadASCIIFilter(), and loadFITSFilter().

Referenced by preInitialize().

Here is the call graph for this function:

◆ loadFITSFilter()

std::shared_ptr< DetectionImageFrame::ImageFilter > SourceXtractor::SegmentationConfig::loadFITSFilter ( const std::string filename) const
private

Definition at line 138 of file SegmentationConfig.cpp.

References conf::filename, Elements::Logging::info(), and SourceXtractor::segConfigLogger.

Referenced by loadFilter().

Here is the call graph for this function:

◆ preInitialize()

void SourceXtractor::SegmentationConfig::preInitialize ( const UserValues args)
overridevirtual

Member Data Documentation

◆ m_bfs_max_delta

int SourceXtractor::SegmentationConfig::m_bfs_max_delta
private

Definition at line 87 of file SegmentationConfig.h.

Referenced by getBfsMaxDelta(), and preInitialize().

◆ m_filter

std::shared_ptr<DetectionImageFrame::ImageFilter> SourceXtractor::SegmentationConfig::m_filter
private

Definition at line 84 of file SegmentationConfig.h.

Referenced by getFilter(), isFilteringEnabled(), and preInitialize().

◆ m_lutz_window_size

int SourceXtractor::SegmentationConfig::m_lutz_window_size
private

Definition at line 86 of file SegmentationConfig.h.

Referenced by getLutzWindowSize(), and preInitialize().

◆ m_selected_algorithm

Algorithm SourceXtractor::SegmentationConfig::m_selected_algorithm
private

Definition at line 83 of file SegmentationConfig.h.

Referenced by getAlgorithmOption(), and preInitialize().


The documentation for this class was generated from the following files: