18 #ifndef itkAttributeMorphologyBaseImageFilter_h
19 #define itkAttributeMorphologyBaseImageFilter_h
54 template <
typename TInputImage,
typename TOutputImage,
typename TAttribute,
typename TFunction>
67 using typename Superclass::InputImagePointer;
81 static constexpr
unsigned int ImageDimension = TOutputImage::ImageDimension;
116 itkSetMacro(FullyConnected,
bool);
117 itkGetConstReferenceMacro(FullyConnected,
bool);
118 itkBooleanMacro(FullyConnected);
133 m_FullyConnected =
false;
134 m_AttributeValuePerPixel = 1;
141 PrintSelf(std::ostream & os,
Indent indent)
const override;
147 GenerateData()
override;
153 GenerateInputRequestedRegion()
override;
160 EnlargeOutputRequestedRegion(
DataObject * itkNotUsed(output))
override;
190 std::unique_ptr<InputPixelType[]>
m_Raw;
204 return (m_TFunction(buf[l], buf[r]));
214 m_Parent[x] = ACTIVE;
215 m_AuxData[x] = m_AttributeValuePerPixel;
221 if (m_Parent[x] >= 0)
223 m_Parent[x] = FindRoot(m_Parent[x]);
224 return (m_Parent[x]);
235 return ((m_Raw[x] == m_Raw[y]) || (m_AuxData[x] < m_Lambda));
247 m_AuxData[p] += m_AuxData[r];
252 m_AuxData[p] = m_Lambda;
259 #ifndef ITK_MANUAL_INSTANTIATION
260 # include "itkAttributeMorphologyBaseImageFilter.hxx"