34#ifndef AIMS_SIGNALFILTER_ELEMENTFILTERFACTORY_D_H
35#define AIMS_SIGNALFILTER_ELEMENTFILTERFACTORY_D_H
58 void ElementFilterFactory<T>::init()
60 static bool initialized =
false;
85 std::map<std::string,carto::rc_ptr<ElementFilteringImageAlgorithm<T> > > & ElementFilterFactory<T>::_map()
87 static std::map<std::string,carto::rc_ptr<ElementFilteringImageAlgorithm<T> > > m;
92 void ElementFilterFactory<T>::registerFilter(
93 const std::string & name,
98 _map()[ name ] = carto::rc_ptr<ElementFilteringImageAlgorithm<T> >( func.clone() );
101 template <
typename T>
102 std::set<std::string> ElementFilterFactory<T>::names()
105 std::set<std::string> s;
106 typename std::map<std::string,carto::rc_ptr<ElementFilteringImageAlgorithm<T> > >::const_iterator i, e = _map().end();
107 for( i=_map().begin(); i!=e; ++i )
108 s.insert( i->first );
112 template <
typename T>
114 const std::string & name,
116 carto::Object options
120 typename std::map<std::string,carto::rc_ptr<ElementFilteringImageAlgorithm<T> > >::const_iterator i;
121 i = _map().find( name );
122 if( i == _map().end() )
125 new_func->setOptions( options );
126 new_func->setStructuringElement(
strel );
130 template <
typename T>
132 const std::string & name,
133 carto::Object options
136 return create( name, strel::Cube(1.0), options );