18#ifndef itkSLICImageFilter_h
19#define itkSLICImageFilter_h
60template <
typename TInputImage,
typename TOutputImage,
typename TDistancePixel =
float>
90 using IndexType =
typename InputImageType::IndexType;
91 using PointType =
typename InputImageType::PointType;
107 itkSetMacro(SpatialProximityWeight,
double);
108 itkGetConstMacro(SpatialProximityWeight,
double);
114 itkSetMacro(MaximumNumberOfIterations,
unsigned int);
115 itkGetConstMacro(MaximumNumberOfIterations,
unsigned int);
138 itkSetMacro(InitializationPerturbation,
bool);
139 itkGetMacro(InitializationPerturbation,
bool);
140 itkBooleanMacro(InitializationPerturbation);
150 itkSetMacro(EnforceConnectivity,
bool);
151 itkGetMacro(EnforceConnectivity,
bool);
152 itkBooleanMacro(EnforceConnectivity);
161 itkGetConstMacro(AverageResidual,
double);
219 std::vector<IndexType> & indexStack);
245#ifndef ITK_MANUAL_INSTANTIATION
246# include "itkSLICImageFilter.hxx"
A templated class holding a point in n-Dimensional image space.
Base class for all data objects in ITK.
Simulate a standard C array with copy semantics.
Templated n-dimensional image class.
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
FixedArray< double, ImageDimension > m_DistanceScales
std::vector< UpdateClusterMap > m_UpdateClusterPerThread
typename InputImageType::PixelType InputPixelType
SuperGridSizeType m_SuperGridSize
double ClusterComponentType
FixedArray< unsigned int, ImageDimension > SuperGridSizeType
void EnlargeOutputRequestedRegion(DataObject *output) override
typename OutputImageType::RegionType OutputImageRegionType
typename OutputImageType::PixelType OutputPixelType
void SingleThreadedConnectivity()
std::vector< ClusterComponentType > m_Clusters
ImageToImageFilter< TInputImage, TOutputImage > Superclass
void ThreadedUpdateClusters(const OutputImageRegionType &updateRegionForThread)
double m_SpatialProximityWeight
void ThreadedPerturbClusters(SizeValueType clusterIndex)
SmartPointer< Self > Pointer
void BeforeThreadedGenerateData() override
DistanceImageType::Pointer m_DistanceImage
void PrintSelf(std::ostream &os, Indent indent) const override
bool m_EnforceConnectivity
Image< DistanceType, ImageDimension > DistanceImageType
void AfterThreadedGenerateData() override
void RelabelConnectedRegion(const IndexType &seed, OutputPixelType requiredLabel, OutputPixelType outputLabel, std::vector< IndexType > &indexStack)
unsigned int m_MaximumNumberOfIterations
ContinuousIndex< typename PointType::ValueType, ImageDimension > ContinuousIndexType
MarkerImageType::Pointer m_MarkerImage
std::map< vcl_size_t, UpdateCluster > UpdateClusterMap
void GenerateData() override
TInputImage InputImageType
TOutputImage OutputImageType
TDistancePixel DistanceType
DistanceType Distance(const ClusterType &cluster1, const ClusterType &cluster2)
DistanceType Distance(const ClusterType &cluster, const InputPixelType &_v, const PointType &pt)
typename InputImageType::PointType PointType
void SetSuperGridSize(unsigned int i, unsigned int factor)
static constexpr unsigned int ImageDimension
SmartPointer< const Self > ConstPointer
~SLICImageFilter() override=default
typename InputImageType::IndexType IndexType
bool m_InitializationPerturbation
vnl_vector_ref< ClusterComponentType > ClusterType
std::vector< ClusterComponentType > m_OldClusters
Image< unsigned char, ImageDimension > MarkerImageType
void SetSuperGridSize(unsigned int factor)
void ThreadedConnectivity(SizeValueType clusterIndex)
void ThreadedUpdateDistanceAndLabel(const OutputImageRegionType &outputRegionForThread)
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
vnl_vector< ClusterComponentType > cluster