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;
207 unsigned int m_MaximumNumberOfIterations{};
208 double m_SpatialProximityWeight{ 10.0 };
211 std::vector<ClusterComponentType> m_Clusters{};
212 std::vector<ClusterComponentType> m_OldClusters{};
216 RelabelConnectedRegion(
const IndexType & seed,
217 OutputPixelType requiredLabel,
218 OutputPixelType outputLabel,
219 std::vector<IndexType> & indexStack);
231 std::vector<UpdateClusterMap> m_UpdateClusterPerThread{};
236 bool m_EnforceConnectivity{
true };
238 bool m_InitializationPerturbation{
true };
240 double m_AverageResidual{};
241 std::mutex m_Mutex{};
245 #ifndef ITK_MANUAL_INSTANTIATION
246 # include "itkSLICImageFilter.hxx"
249 #endif // itkSLICImageFilter_h