|
OTB
9.0.0
Orfeo Toolbox
|
Go to the documentation of this file.
22 #ifndef otbStreamingImageToOGRLayerSegmentationFilter_h
23 #define otbStreamingImageToOGRLayerSegmentationFilter_h
25 #include "itkExtractImageFilter.h"
30 #include "itkMultiplyImageFilter.h"
45 template <
class TInputImage,
class TOutputImage,
class TOutputImage2,
class TKernelType>
60 template <
class TImageType,
class TSegmentationFilter>
94 itkSetStringMacro(FieldName);
95 itkGetStringMacro(FieldName);
110 itkSetMacro(Use8Connected,
bool);
115 itkGetMacro(Use8Connected,
bool);
118 itkSetMacro(FilterSmallObject,
bool);
121 itkGetMacro(FilterSmallObject,
bool);
124 itkSetMacro(MinimumObjectSize,
unsigned int);
127 itkGetMacro(MinimumObjectSize,
unsigned int);
137 itkSetMacro(SimplificationTolerance,
double);
142 itkGetMacro(SimplificationTolerance,
double);
202 template <
class TImageType,
class TSegmentationFilter>
227 typedef typename InputImageType::SizeType
SizeType;
230 using Superclass::SetInput;
233 this->GetFilter()->SetInput(input);
237 return this->GetFilter()->GetInput();
246 this->GetFilter()->SetInputMask(mask);
250 return this->GetFilter()->GetInputMask();
256 this->GetFilter()->SetOGRLayer(ogrLayer);
261 this->GetFilter()->SetFieldName(fieldName);
266 return this->GetFilter()->GetFieldName();
272 return this->GetFilter()->GetSegmentationFilter();
278 this->GetFilter()->SetStartLabel(label);
284 return this->GetFilter()->GetStartLabel();
290 return this->GetFilter()->GetStreamSize();
295 this->GetFilter()->Initialize();
302 this->GetFilter()->SetUse8Connected(flag);
307 return this->GetFilter()->GetUse8Connected();
312 this->GetFilter()->SetFilterSmallObject(flag);
317 return this->GetFilter()->GetFilterSmallObject();
322 this->GetFilter()->SetMinimumObjectSize(size);
327 return this->GetFilter()->GetMinimumObjectSize();
332 this->GetFilter()->SetSimplify(flag);
337 return this->GetFilter()->GetSimplify();
344 this->GetFilter()->SetSimplificationTolerance(tol);
349 return this->GetFilter()->GetSimplificationTolerance();
365 void operator=(
const Self&) =
delete;
369 #ifndef OTB_MANUAL_INSTANTIATION
const LabelPixelType & GetStartLabel()
virtual void SetInputMask(const LabelImageType *mask)
RelabelComponentImageFilter< LabelImageType, LabelImageType > RelabelComponentImageFilterType
OGRDataSourcePointerType ProcessTile() override
virtual const LabelImageType * GetInputMask(void)
unsigned int m_MinimumObjectSize
double GetSimplificationTolerance()
bool GetFilterSmallObject()
InputImageType::SizeType SizeType
StreamingImageToOGRLayerSegmentationFilter Self
TImageType InputImageType
TSegmentationFilter SegmentationFilterType
PersistentImageToOGRLayerFilter< TImageType > Superclass
OGRDataSourceType::Pointer OGRDataSourcePointerType
~PersistentImageToOGRLayerSegmentationFilter() override
void SetMinimumObjectSize(const unsigned int &size)
PersistentFilterStreamingDecorator< PersistentImageToOGRLayerSegmentationFilter< TImageType, TSegmentationFilter > > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Creation of an "otb" image which contains metadata.
Collection of geometric objects.
LabeledOutputAccessor< SegmentationFilterType >::LabelImageType LabelImageType
itk::SmartPointer< Self > Pointer
Accessor to the index of the labeled output image of the Template Filter.
LabelPixelType m_StartLabel
Superclass::OGRLayerType OGRLayerType
otb::LabelImageToOGRDataSourceFilter< LabelImageType > LabelImageToOGRDataSourceFilterType
PersistentImageToOGRLayerSegmentationFilter< TImageType, TSegmentationFilter >::OGRDataSourcePointerType OGRDataSourcePointerType
PersistentImageToOGRLayerSegmentationFilter< TImageType, TSegmentationFilter >::LabelPixelType LabelPixelType
itkGetObjectMacro(SegmentationFilter, SegmentationFilterType)
void SetStartLabel(const LabelPixelType &label)
void SetInputMask(LabelImageType *mask)
TSegmentationFilter SegmentationFilterType
void SetFilterSmallObject(bool flag)
OTBGdalAdapters_EXPORT UniqueGeometryPtr Simplify(OGRGeometry const &g, double tolerance)
SegmentationFilterType::Pointer m_SegmentationFilter
LabelImageType::PixelType LabelPixelType
PersistentImageToOGRLayerSegmentationFilter< TImageType, TSegmentationFilter >::OGRLayerType OGRLayerType
Superclass::InputImagePointer InputImagePointerType
void SetInput(InputImageType *input)
SegmentationFilterType * GetSegmentationFilter()
PersistentImageToOGRLayerSegmentationFilter Self
unsigned int m_TileNumber
void SetSimplify(bool flag)
StreamingImageToOGRLayerSegmentationFilter()
itk::MultiplyImageFilter< LabelImageType, LabelImageType, LabelImageType > MultiplyImageFilterType
itk::SmartPointer< const Self > ConstPointer
This filter link a persistent filter with a StreamingImageVirtualWriter.
const LabelImageType * GetInputMask()
PersistentImageToOGRLayerSegmentationFilter< TImageType, TSegmentationFilter >::LabelImageType LabelImageType
Superclass::OGRDataSourcePointerType OGRDataSourcePointerType
static const unsigned int LabeledOutputIndex
~StreamingImageToOGRLayerSegmentationFilter() override
Superclass::OGRDataSourceType OGRDataSourceType
PersistentImageToOGRLayerSegmentationFilter()
void SetFieldName(const std::string &fieldName)
Superclass::InputImageType InputImageType
itk::SmartPointer< const Self > ConstPointer
void operator=(const Self &)=delete
double m_SimplificationTolerance
itk::SmartPointer< Self > Pointer
void SetUse8Connected(bool flag)
void SetSimplificationTolerance(const double &tol)
Layer of geometric objects.
const std::string & GetFieldName() const
const InputImageType * GetInput()
Perform vectorization in a persistent way.
TFilter::OutputImageType LabelImageType
This filter is a framework for large scale segmentation. It is a persistent filter that process the i...
void SetOGRLayer(const OGRLayerType &ogrLayer)
void SetStartLabel(const LabelPixelType &label)
Relabel the components in an image such that consecutive labels are used.
unsigned int GetMinimumObjectSize()
InputImageType::Pointer InputImagePointer