21 #ifndef otbOGRDataToClassStatisticsFilter_h
22 #define otbOGRDataToClassStatisticsFilter_h
26 #include "itkSimpleDataObjectDecorator.h"
39 template <
class TInputImage,
class TMaskImage>
53 typedef typename InputImageType::PointType
PointType;
69 void Synthetize(
void)
override;
72 void Reset(
void)
override;
87 using Superclass::MakeOutput;
99 void ProcessSample(
const ogr::Feature& feature,
typename TInputImage::IndexType& imgIndex,
typename TInputImage::PointType& imgPoint,
100 itk::ThreadIdType& threadid)
override;
103 void PrepareFeature(
const ogr::Feature& feature, itk::ThreadIdType& threadid)
override;
134 template <
class TInputImage,
class TMaskImage>
161 using Superclass::SetInput;
162 virtual void SetInput(
const TInputImage* image);
164 const TInputImage* GetInput();
169 void SetMask(
const TMaskImage* mask);
170 const TMaskImage* GetMask();
172 void SetFieldName(std::string& key);
173 std::string GetFieldName();
175 void SetLayerIndex(
int index);
202 #ifndef OTB_MANUAL_INSTANTIATION
Computes class statistics based on vectors using a persistent filter.
FilterType::ClassCountMapType ClassCountMapType
~OGRDataToClassStatisticsFilter() override
FilterType::PolygonSizeMapType PolygonSizeMapType
otb::ogr::DataSource OGRDataType
Superclass::FilterType FilterType
void operator=(const Self &)=delete
itk::SmartPointer< Self > Pointer
FilterType::ClassCountObjectType ClassCountObjectType
OGRDataToClassStatisticsFilter Self
itk::SmartPointer< const Self > ConstPointer
OGRDataToClassStatisticsFilter(const Self &)=delete
TInputImage InputImageType
PersistentFilterStreamingDecorator< PersistentOGRDataToClassStatisticsFilter< TInputImage, TMaskImage > > Superclass
OGRDataToClassStatisticsFilter()
FilterType::PolygonSizeObjectType PolygonSizeObjectType
This filter link a persistent filter with a StreamingImageVirtualWriter.
Persistent filter to compute class statistics based on vectors.
std::map< std::string, unsigned long > ClassCountMapType
itk::DataObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
TInputImage InputImageType
itk::SimpleDataObjectDecorator< ClassCountMapType > ClassCountObjectType
itk::SmartPointer< Self > Pointer
std::vector< unsigned long > m_NbPixelsThread
std::vector< unsigned long > m_CurrentFID
~PersistentOGRDataToClassStatisticsFilter() override
PersistentOGRDataToClassStatisticsFilter Self
itk::SmartPointer< const Self > ConstPointer
itk::SimpleDataObjectDecorator< PolygonSizeMapType > PolygonSizeObjectType
std::vector< std::string > m_CurrentClass
PersistentOGRDataToClassStatisticsFilter(const Self &)=delete
PersistentSamplingFilterBase< TInputImage, TMaskImage > Superclass
InputImageType::Pointer InputImagePointer
InputImageType::RegionType RegionType
std::vector< ClassCountMapType > m_ElmtsInClassThread
std::vector< PolygonSizeMapType > m_PolygonThread
void operator=(const Self &)=delete
std::map< unsigned long, unsigned long > PolygonSizeMapType
InputImageType::PointType PointType
Base class for persistent filter doing sampling tasks.
Collection of geometric objects.
Geometric object with descriptive fields.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.