|
@@ -100,7 +100,7 @@ void OBJREC::LFonHSG::initFromConfig(const NICE::Config * _conf, const std::stri
|
|
|
this->scales = _conf->gS (_confSection, "scales" , "1");
|
|
|
|
|
|
this->lf = NULL;
|
|
|
- this->lf = GenericLocalFeatureSelection::selectLocalFeature (_conf, _confSection /*TODO check whether it is useful to hand over the confSection string here*/);
|
|
|
+ this->lf = OBJREC::GenericLocalFeatureSelection::selectLocalFeature (_conf, _confSection /*TODO check whether it is useful to hand over the confSection string here*/);
|
|
|
|
|
|
/** parse scales string **/
|
|
|
this->convertScalesStringToScaleList();
|
|
@@ -195,7 +195,7 @@ void LFonHSG::restore ( std::istream & is, int format )
|
|
|
|
|
|
std::string tmp;
|
|
|
is >> tmp; //class name
|
|
|
-
|
|
|
+
|
|
|
if ( ! this->isStartTag( tmp, "LFonHSG" ) )
|
|
|
{
|
|
|
std::cerr << " WARNING - attempt to restore LFonHSG, but start flag " << tmp << " does not match! Aborting... " << std::endl;
|
|
@@ -215,7 +215,6 @@ void LFonHSG::restore ( std::istream & is, int format )
|
|
|
}
|
|
|
|
|
|
tmp = this->removeStartTag ( tmp );
|
|
|
-
|
|
|
|
|
|
if ( tmp.compare("debug") == 0 )
|
|
|
{
|
|
@@ -237,6 +236,7 @@ void LFonHSG::restore ( std::istream & is, int format )
|
|
|
}
|
|
|
else if ( tmp.compare("scalesV") == 0 )
|
|
|
{
|
|
|
+ is >> tmp; //size:
|
|
|
unsigned int ui_scalesVSize;
|
|
|
is >> ui_scalesVSize;
|
|
|
this->scalesV.clear();
|
|
@@ -254,7 +254,7 @@ void LFonHSG::restore ( std::istream & is, int format )
|
|
|
}
|
|
|
else if ( tmp.compare("lf") == 0 )
|
|
|
{
|
|
|
- this->lf->restore ( is );
|
|
|
+ OBJREC::GenericLocalFeatureSelection::restoreLocalFeature( this->lf, is );
|
|
|
is >> tmp; // end of block
|
|
|
tmp = this->removeEndTag ( tmp );
|
|
|
}
|
|
@@ -300,7 +300,11 @@ void LFonHSG::store ( std::ostream & os, int format ) const
|
|
|
os << this->createEndTag( "scalesV" ) << std::endl;
|
|
|
|
|
|
os << this->createStartTag( "lf" ) << std::endl;
|
|
|
- this->lf->store ( os );
|
|
|
+ if ( this->lf != NULL )
|
|
|
+ {
|
|
|
+ //TODO this might be tricky if lf was not intantiated properly.
|
|
|
+ this->lf->store ( os );
|
|
|
+ }
|
|
|
os << this->createEndTag( "lf" ) << std::endl;
|
|
|
|
|
|
// done
|