18 #ifndef itkSLICImageFilter_h
19 #define itkSLICImageFilter_h
60 template <
typename TInputImage,
typename TOutputImage,
typename TDistancePixel =
float>
79 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
107 itkSetMacro(SpatialProximityWeight,
double);
108 itkGetConstMacro(SpatialProximityWeight,
double);
114 itkSetMacro(MaximumNumberOfIterations,
unsigned int);
115 itkGetConstMacro(MaximumNumberOfIterations,
unsigned int);
127 SetSuperGridSize(
unsigned int factor);
129 SetSuperGridSize(
unsigned int i,
unsigned int factor);
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);
168 PrintSelf(std::ostream & os,
Indent indent)
const override;
172 EnlargeOutputRequestedRegion(
DataObject * output)
override;
175 BeforeThreadedGenerateData()
override;
190 SingleThreadedConnectivity();
193 GenerateData()
override;
197 AfterThreadedGenerateData()
override;
208 double m_SpatialProximityWeight{ 10.0 };
216 RelabelConnectedRegion(
const IndexType & seed,
219 std::vector<IndexType> & indexStack);
236 bool m_EnforceConnectivity{
true };
238 bool m_InitializationPerturbation{
true };
245 #ifndef ITK_MANUAL_INSTANTIATION
246 # include "itkSLICImageFilter.hxx"
249 #endif // itkSLICImageFilter_h