18#ifndef itkAttributeMorphologyBaseImageFilter_h
19#define itkAttributeMorphologyBaseImageFilter_h
53template <
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;
164 bool m_FullyConnected{};
189 std::unique_ptr<InputPixelType[]>
m_Raw;
203 return (m_TFunction(buf[l], buf[r]));
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"
bool operator()(OffsetValueType const &l, OffsetValueType const &r) const
Morphological opening by attributes.
std::unique_ptr< OffsetValueType[]> m_Parent
void GenerateData() override
typename TInputImage::IndexType IndexType
void MakeSet(OffsetValueType x)
std::unique_ptr< AttributeType[]> m_AuxData
void PrintSelf(std::ostream &os, Indent indent) const override
typename TInputImage::OffsetType OffsetType
typename TInputImage::SizeType SizeType
void GenerateInputRequestedRegion() override
typename TOutputImage::PixelType OutputPixelType
void SetupOffsetVec(OffsetDirectVecType &PosOffsets, OffsetVecType &Offsets)
AttributeMorphologyBaseImageFilter(const Self &)
std::unique_ptr< OffsetValueType[]> m_SortPixels
std::vector< OffsetValueType > OffsetDirectVecType
OffsetValueType FindRoot(OffsetValueType x)
std::unique_ptr< InputPixelType[]> m_Raw
typename TOutputImage::InternalPixelType OutputInternalPixelType
bool Criterion(OffsetValueType x, OffsetValueType y)
typename TOutputImage::RegionType RegionType
typename TInputImage::PixelType InputPixelType
typename TInputImage::InternalPixelType InputInternalPixelType
void EnlargeOutputRequestedRegion(DataObject *) override
AttributeMorphologyBaseImageFilter()
void Union(OffsetValueType n, OffsetValueType p)
std::vector< OffsetType > OffsetVecType
std::list< IndexType > ListType
~AttributeMorphologyBaseImageFilter() override=default
Base class for all data objects in ITK.
Base class for all process objects that output image data.
TOutputImage OutputImageType
Base class for filters that take an image as input and produce an image as output.
TInputImage InputImageType
Control indentation during Print() invocation.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....