#include <itkScanlineFilterCommon.h>
Helper class for a group of filters which operate on scan-lines.
This implementation was taken from the Insight Journal paper: https://doi.org/10.54294/q6auw4
Definition at line 41 of file itkScanlineFilterCommon.h.
Inheritance diagram for itk::ScanlineFilterCommon< TInputImage, TOutputImage >:
Collaboration diagram for itk::ScanlineFilterCommon< TInputImage, TOutputImage >:Classes | |
| struct | RunLength |
| struct | WorkUnitData |
Public Types | |
| using | ConstPointer = SmartPointer<const Self> |
| using | EnclosingFilter = ImageToImageFilter<TInputImage, TOutputImage> |
| using | IndexType = typename TInputImage::IndexType |
| using | InputImageConstPointer = typename InputImageType::ConstPointer |
| using | InputImagePointer = typename InputImageType::Pointer |
| using | InputImageType = TInputImage |
| using | InputPixelType = typename TInputImage::PixelType |
| using | OffsetType = typename TInputImage::OffsetType |
| using | OutputImagePixelType = typename TOutputImage::PixelType |
| using | OutputImagePointer = typename OutputImageType::Pointer |
| using | OutputImageType = TOutputImage |
| using | OutputIndexType = typename TOutputImage::IndexType |
| using | OutputOffsetType = typename TOutputImage::OffsetType |
| using | OutputPixelType = typename TOutputImage::PixelType |
| using | OutputRegionType = typename TOutputImage::RegionType |
| using | OutputSizeType = typename TOutputImage::SizeType |
| using | Pointer = SmartPointer<Self> |
| using | RegionType = OutputRegionType |
| using | Self = ScanlineFilterCommon |
| using | SizeType = typename TInputImage::SizeType |
Public Member Functions | |
| void | Register () const |
| ScanlineFilterCommon (EnclosingFilter *enclosingFilter) | |
| void | UnRegister () const noexcept |
| ~ScanlineFilterCommon ()=default | |
Static Public Member Functions | |
| static Pointer | New () |
Static Public Attributes | |
| static constexpr unsigned int | ImageDimension = TOutputImage::ImageDimension |
| static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
| static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Protected Types | |
| using | CompareLinesCallback |
| using | ConsecutiveVectorType = std::vector<OutputPixelType> |
| using | InternalLabelType = SizeValueType |
| using | LineEncodingConstIterator = typename LineEncodingType::const_iterator |
| using | LineEncodingIterator = typename LineEncodingType::iterator |
| using | LineEncodingType = std::vector<RunLength> |
| using | LineMapType = std::vector<LineEncodingType> |
| using | OffsetVectorConstIterator = typename OffsetVectorType::const_iterator |
| using | OffsetVectorType = std::vector<OffsetValueType> |
| using | OutSizeType = typename TOutputImage::RegionType::SizeType |
| using | UnionFindType = std::vector<InternalLabelType> |
Protected Member Functions | |
| bool | CheckNeighbors (const OutputIndexType &A, const OutputIndexType &B) const |
| void | CompareLines (const LineEncodingType ¤t, const LineEncodingType &Neighbour, bool sameLineOffset, bool labelCompare, OutputPixelType background, CompareLinesCallback callback) |
| void | ComputeEquivalence (const SizeValueType workUnitResultsIndex, bool strictlyLess) |
| SizeValueType | CreateConsecutive (OutputPixelType backgroundValue) |
| WorkUnitData | CreateWorkUnitData (const RegionType &outputRegionForThread) |
| SizeValueType | IndexToLinearIndex (const IndexType &index) const |
| void | InitUnion (InternalLabelType numberOfLabels) |
| void | LinkLabels (const InternalLabelType label1, const InternalLabelType label2) |
| InternalLabelType | LookupSet (const InternalLabelType label) |
| void | SetupLineOffsets (bool wholeNeighborhood) |
Protected Attributes | |
| ConsecutiveVectorType | m_Consecutive |
| WeakPointer< EnclosingFilter > | m_EnclosingFilter |
| bool | m_FullyConnected { false } |
| LineMapType | m_LineMap |
| OffsetVectorType | m_LineOffsets |
| std::mutex | m_Mutex |
| std::atomic< SizeValueType > | m_NumberOfLabels |
| UnionFindType | m_UnionFind |
| std::deque< WorkUnitData > | m_WorkUnitResults |
|
protected |
Definition at line 250 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 134 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 48 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::EnclosingFilter = ImageToImageFilter<TInputImage, TOutputImage> |
Definition at line 99 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::IndexType = typename TInputImage::IndexType |
Definition at line 85 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputImageConstPointer = typename InputImageType::ConstPointer |
Definition at line 84 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputImagePointer = typename InputImageType::Pointer |
Definition at line 83 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputImageType = TInputImage |
Definition at line 82 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputPixelType = typename TInputImage::PixelType |
Definition at line 78 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 108 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 126 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 125 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 124 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 131 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OffsetType = typename TInputImage::OffsetType |
Definition at line 87 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 129 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 128 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputImagePixelType = typename TOutputImage::PixelType |
Definition at line 95 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputImagePointer = typename OutputImageType::Pointer |
Definition at line 89 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputImageType = TOutputImage |
Definition at line 88 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputIndexType = typename TOutputImage::IndexType |
Definition at line 92 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputOffsetType = typename TOutputImage::OffsetType |
Definition at line 94 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputPixelType = typename TOutputImage::PixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 77 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputRegionType = typename TOutputImage::RegionType |
Definition at line 90 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputSizeType = typename TOutputImage::SizeType |
Definition at line 93 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 109 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 47 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::RegionType = OutputRegionType |
Definition at line 91 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::Self = ScanlineFilterCommon |
Definition at line 46 of file itkScanlineFilterCommon.h.
| using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::SizeType = typename TInputImage::SizeType |
Definition at line 86 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 133 of file itkScanlineFilterCommon.h.
|
inline |
Definition at line 101 of file itkScanlineFilterCommon.h.
References m_EnclosingFilter.
|
default |
|
inlineprotected |
Definition at line 228 of file itkScanlineFilterCommon.h.
References itk::Math::abs(), m_FullyConnected, and OutputImageDimension.
Referenced by ComputeEquivalence().
|
inlineprotected |
Definition at line 256 of file itkScanlineFilterCommon.h.
References ImageDimension, and m_FullyConnected.
Referenced by ComputeEquivalence().
|
inlineprotected |
Definition at line 459 of file itkScanlineFilterCommon.h.
References CheckNeighbors(), CompareLines(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::WorkUnitData::firstLine, itk::ScanlineFilterCommon< TInputImage, TOutputImage >::WorkUnitData::lastLine, LinkLabels(), m_LineMap, m_LineOffsets, and m_WorkUnitResults.
|
inlineprotected |
Definition at line 200 of file itkScanlineFilterCommon.h.
References m_Consecutive, and m_UnionFind.
|
inlineprotected |
Definition at line 446 of file itkScanlineFilterCommon.h.
References IndexToLinearIndex().
|
inlineprotected |
Definition at line 137 of file itkScanlineFilterCommon.h.
References ImageDimension, and m_EnclosingFilter.
Referenced by CreateWorkUnitData().
|
inlineprotected |
Definition at line 153 of file itkScanlineFilterCommon.h.
References m_LineMap, and m_UnionFind.
|
inlineprotected |
Definition at line 183 of file itkScanlineFilterCommon.h.
References LookupSet(), m_Mutex, and m_UnionFind.
Referenced by ComputeEquivalence().
|
inlineprotected |
Definition at line 172 of file itkScanlineFilterCommon.h.
References m_UnionFind.
Referenced by LinkLabels().
|
inlinestatic |
Definition at line 62 of file itkScanlineFilterCommon.h.
References itk::ObjectFactory< T >::Create(), and itk::SmartPointer< TObjectType >::UnRegister().
|
inline |
Definition at line 50 of file itkScanlineFilterCommon.h.
References m_EnclosingFilter, and itk::Object::Register().
|
inlineprotected |
Definition at line 381 of file itkScanlineFilterCommon.h.
References m_EnclosingFilter, m_FullyConnected, m_LineOffsets, itk::setConnectivity(), and itk::setConnectivityPrevious().
|
inlinenoexcept |
Definition at line 56 of file itkScanlineFilterCommon.h.
References m_EnclosingFilter, and itk::Object::UnRegister().
|
staticconstexpr |
Definition at line 79 of file itkScanlineFilterCommon.h.
Referenced by CompareLines(), and IndexToLinearIndex().
|
staticconstexpr |
Definition at line 81 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 506 of file itkScanlineFilterCommon.h.
Referenced by CreateConsecutive().
|
protected |
Definition at line 437 of file itkScanlineFilterCommon.h.
Referenced by IndexToLinearIndex(), Register(), ScanlineFilterCommon(), SetupLineOffsets(), and UnRegister().
|
protected |
Definition at line 503 of file itkScanlineFilterCommon.h.
Referenced by CheckNeighbors(), CompareLines(), and SetupLineOffsets().
|
protected |
Definition at line 511 of file itkScanlineFilterCommon.h.
Referenced by ComputeEquivalence(), and InitUnion().
|
protected |
Definition at line 504 of file itkScanlineFilterCommon.h.
Referenced by ComputeEquivalence(), and SetupLineOffsets().
|
protected |
Definition at line 507 of file itkScanlineFilterCommon.h.
Referenced by LinkLabels().
|
protected |
Definition at line 509 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 505 of file itkScanlineFilterCommon.h.
Referenced by CreateConsecutive(), InitUnion(), LinkLabels(), and LookupSet().
|
protected |
Definition at line 510 of file itkScanlineFilterCommon.h.
Referenced by ComputeEquivalence().
|
staticconstexpr |
Definition at line 80 of file itkScanlineFilterCommon.h.
Referenced by CheckNeighbors().