18 #ifndef itkAttributeMorphologyBaseImageFilter_h
19 #define itkAttributeMorphologyBaseImageFilter_h
53 template <
typename TInputImage,
typename TOutputImage,
typename TAttribute,
typename TFunction>
66 using typename Superclass::InputImagePointer;
80 static constexpr
unsigned int ImageDimension = TOutputImage::ImageDimension;
115 itkSetMacro(FullyConnected,
bool);
116 itkGetConstReferenceMacro(FullyConnected,
bool);
117 itkBooleanMacro(FullyConnected);
132 m_FullyConnected =
false;
133 m_AttributeValuePerPixel = 1;
140 PrintSelf(std::ostream & os,
Indent indent)
const override;
146 GenerateData()
override;
152 GenerateInputRequestedRegion()
override;
159 EnlargeOutputRequestedRegion(
DataObject * itkNotUsed(output))
override;
164 bool m_FullyConnected{};
189 std::unique_ptr<InputPixelType[]>
m_Raw;
203 return (m_TFunction(buf[l], buf[r]));
207 CompareOffsetType m_CompareOffset{};
213 m_Parent[x] = ACTIVE;
214 m_AuxData[x] = m_AttributeValuePerPixel;
220 if (m_Parent[x] >= 0)
222 m_Parent[x] = FindRoot(m_Parent[x]);
223 return (m_Parent[x]);
234 return ((m_Raw[x] == m_Raw[y]) || (m_AuxData[x] < m_Lambda));
246 m_AuxData[p] += m_AuxData[r];
251 m_AuxData[p] = m_Lambda;
258 #ifndef ITK_MANUAL_INSTANTIATION
259 # include "itkAttributeMorphologyBaseImageFilter.hxx"