Hi Joe,

Sorry for the late reply. It's possible it's just an error in the code. Can you 
open an issue about this on our bug tracker:

https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/issues

Thanks,

Victor Poughon

De : [email protected] <[email protected]> De la part de Joe 
Derksen
Envoyé : jeudi 10 janvier 2019 15:13
À : otb-users <[email protected]>
Objet : [otb-users] Questions about Image Sample Extractor Filter and 
PersistentSamplingFilterBase

Hello OTB team,

I have been using the ImageSampleExtractorFilter, and its superclass 
PersistentSamplingFilterBase, and I have a few questions concerning these 
classes.

1. What is the point of the "FieldName" attribute ?

otbPersistentSamplingFilterBase.h lines 81-84
/** Set/Get macro for the field name containing class names
   * in the input vectors.*/
  itkSetMacro(FieldName, std::string);
  itkGetMacro(FieldName, std::string);

It is only called once, and basically raises an error if the field isn't 
present in the output shapefile..

otbPersistentSamplingFilterBase.hxx lines 118-123
int fieldIndex = featIt->ogr().GetFieldIndex(this->m_FieldName.c_str());
  if (fieldIndex < 0)
    {
    itkGenericExceptionMacro("Field named "<<this->m_FieldName<<" not found!");
    }
  this->m_FieldIndex = fieldIndex;

The m_FieldIndex attribute is not called anywhere else except for in these 
lines.. It seems totally useless !

I do not understand why the filter requires the user to give the name of one of 
the fields in the output shapefile for the sample extraction step anyway. The 
filter and the application should work even if the output shapefile contains no 
fields at all. This is also quite inconvenient for anyone inheriting this 
class, as they are also required to give a field name.

2. The PersistentSamplingFilterBase provides a "ProcessSample" method that 
should be overriden by a child class, and that gives the unita
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to 
[email protected]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[email protected]>
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

-- 
This mailing will be abandoned soon in favor of a more friendly forum:
https://forum.orfeo-toolbox.org
Thanks to visit it for any question related to Orfeo Toolbox (OTB) usage, or to 
check the OTB FAQ:
http://www.orfeo-toolbox.org/FAQ.html
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to