18 #ifndef itkSLICImageFilter_h
19 #define itkSLICImageFilter_h
59 template <
typename TInputImage,
typename TOutputImage,
typename TDistancePixel =
float>
107 itkSetMacro( SpatialProximityWeight,
double );
108 itkGetConstMacro( SpatialProximityWeight,
double );
114 itkSetMacro( MaximumNumberOfIterations,
unsigned int );
115 itkGetConstMacro( MaximumNumberOfIterations,
unsigned int );
136 itkSetMacro(InitializationPerturbation,
bool);
137 itkGetMacro(InitializationPerturbation,
bool);
138 itkBooleanMacro(InitializationPerturbation);
148 itkSetMacro(EnforceConnectivity,
bool);
149 itkGetMacro(EnforceConnectivity,
bool);
150 itkBooleanMacro(EnforceConnectivity);
159 itkGetConstMacro( AverageResidual,
double );
205 std::vector<IndexType> & indexStack);
231 #ifndef ITK_MANUAL_INSTANTIATION
232 #include "itkSLICImageFilter.hxx"
235 #endif //itkSLICImageFilter_h
void AfterThreadedGenerateData() override
std::map< vcl_size_t, UpdateCluster > UpdateClusterMap
TDistancePixel DistanceType
vnl_vector< ClusterComponentType > cluster
void BeforeThreadedGenerateData() override
DistanceType Distance(const ClusterType &cluster1, const ClusterType &cluster2)
std::vector< ClusterComponentType > m_OldClusters
void EnlargeOutputRequestedRegion(DataObject *output) override
MarkerImageType::Pointer m_MarkerImage
static constexpr unsigned int ImageDimension
std::vector< ClusterComponentType > m_Clusters
typename OutputImageType::PixelType OutputPixelType
unsigned long SizeValueType
vnl_vector_ref< ClusterComponentType > ClusterType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename InputImageType::PointType PointType
typename InputImageType::IndexType IndexType
virtual void SetSuperGridSize(SuperGridSizeType _arg)
The expected superpixel size and shape.
Base class for all process objects that output image data.
void PrintSelf(std::ostream &os, Indent indent) const override
TInputImage InputImageType
void SingleThreadedConnectivity()
unsigned int m_MaximumNumberOfIterations
SuperGridSizeType m_SuperGridSize
void ThreadedPerturbClusters(SizeValueType idx)
bool m_InitializationPerturbation
typename OutputImageType::RegionType OutputImageRegionType
ImageBaseType::IndexType IndexType
bool m_EnforceConnectivity
TOutputImage OutputImageType
DistanceImageType::Pointer m_DistanceImage
FixedArray< double, ImageDimension > m_DistanceScales
double ClusterComponentType
void RelabelConnectedRegion(const IndexType &seed, OutputPixelType requiredLabel, OutputPixelType outputLabel, std::vector< IndexType > &indexStack)
std::vector< UpdateClusterMap > m_UpdateClusterPerThread
A templated class holding a point in n-Dimensional image space.
void ThreadedUpdateClusters(const OutputImageRegionType &outputRegionForThread)
Simple Linear Iterative Clustering (SLIC) super-pixel segmentation.
~SLICImageFilter() override=default
Base class for filters that take an image as input and produce an image as output.
double m_SpatialProximityWeight
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
void GenerateData() override
typename InputImageType::PixelType InputPixelType
ImageBaseType::RegionType RegionType
void ThreadedUpdateDistanceAndLabel(const OutputImageRegionType &outputRegionForThread)
Base class for all data objects in ITK.
Templated n-dimensional image class.
void ThreadedConnectivity(SizeValueType idx)