18#ifndef itkConnectedComponentAlgorithm_h
19#define itkConnectedComponentAlgorithm_h
26template <
typename TIterator>
30 typename TIterator::OffsetType offset;
31 it->ClearActiveList();
40 it->ActivateOffset(offset);
42 it->ActivateOffset(offset);
50 unsigned int centerIndex = it->GetCenterNeighborhoodIndex();
51 for (
unsigned int d = 0; d < centerIndex * 2 + 1; ++d)
53 offset = it->GetOffset(d);
54 it->ActivateOffset(offset);
57 it->DeactivateOffset(offset);
62template <
typename TIterator>
67 typename TIterator::OffsetType offset;
68 it->ClearActiveList();
77 it->ActivateOffset(offset);
85 unsigned int centerIndex = it->GetCenterNeighborhoodIndex();
86 for (
unsigned int d = 0; d < centerIndex; ++d)
88 offset = it->GetOffset(d);
89 it->ActivateOffset(offset);
92 it->DeactivateOffset(offset);
97template <
typename TIterator>
102 typename TIterator::OffsetType offset;
103 it->ClearActiveList();
112 it->ActivateOffset(offset);
120 unsigned int centerIndex = it->GetCenterNeighborhoodIndex();
121 for (
unsigned int d = centerIndex + 1; d < 2 * centerIndex + 1; ++d)
123 offset = it->GetOffset(d);
124 it->ActivateOffset(offset);
127 it->DeactivateOffset(offset);
constexpr unsigned int Dimension
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
TIterator * setConnectivityLater(TIterator *it, bool fullyConnected=false)
TIterator * setConnectivity(TIterator *it, bool fullyConnected=false)
TIterator * setConnectivityPrevious(TIterator *it, bool fullyConnected=false)