ITK
6.0.0
Insight Toolkit
|
#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.
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 = std::function< void(const LineEncodingConstIterator ¤tRun, const LineEncodingConstIterator &neighborRun, OffsetValueType oStart, OffsetValueType oLast)> |
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 256 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 137 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 102 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 111 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 129 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 128 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 127 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 134 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 132 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 131 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 112 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 136 of file itkScanlineFilterCommon.h.
|
inline |
Definition at line 104 of file itkScanlineFilterCommon.h.
|
default |
|
inlineprotected |
Definition at line 231 of file itkScanlineFilterCommon.h.
References itk::Math::abs(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_FullyConnected, and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputImageDimension.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ComputeEquivalence().
|
inlineprotected |
Definition at line 259 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ImageDimension, and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_FullyConnected.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ComputeEquivalence().
|
inlineprotected |
Definition at line 462 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CheckNeighbors(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CompareLines(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::WorkUnitData::firstLine, itk::ScanlineFilterCommon< TInputImage, TOutputImage >::WorkUnitData::lastLine, itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LinkLabels(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_LineMap, itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_LineOffsets, and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_WorkUnitResults.
|
inlineprotected |
Definition at line 203 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_Consecutive, and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_UnionFind.
|
inlineprotected |
Definition at line 449 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::IndexToLinearIndex().
|
inlineprotected |
Definition at line 140 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ImageDimension, and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_EnclosingFilter.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CreateWorkUnitData().
|
inlineprotected |
Definition at line 156 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_LineMap, and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_UnionFind.
|
inlineprotected |
Definition at line 186 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LookupSet(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_Mutex, and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_UnionFind.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ComputeEquivalence().
|
inlineprotected |
Definition at line 175 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_UnionFind.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LinkLabels().
|
inlinestatic |
Definition at line 62 of file itkScanlineFilterCommon.h.
References itk::ObjectFactory< T >::Create().
|
inline |
Definition at line 50 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_EnclosingFilter.
|
inlineprotected |
Definition at line 384 of file itkScanlineFilterCommon.h.
References itk::ImageRegion< VImageDimension >::GetSize(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_EnclosingFilter, itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_FullyConnected, itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_LineOffsets, New(), itk::setConnectivity(), itk::setConnectivityPrevious(), and itk::Size< VDimension >::SetSize().
|
inlinenoexcept |
Definition at line 56 of file itkScanlineFilterCommon.h.
References itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_EnclosingFilter.
|
staticconstexpr |
Definition at line 79 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CompareLines(), and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::IndexToLinearIndex().
|
staticconstexpr |
Definition at line 81 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 509 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CreateConsecutive().
|
protected |
Definition at line 440 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::IndexToLinearIndex(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::Register(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::SetupLineOffsets(), and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::UnRegister().
|
protected |
|
protected |
Definition at line 514 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ComputeEquivalence(), and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InitUnion().
|
protected |
Definition at line 507 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ComputeEquivalence(), and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::SetupLineOffsets().
|
protected |
Definition at line 510 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LinkLabels().
|
protected |
Definition at line 512 of file itkScanlineFilterCommon.h.
|
protected |
Definition at line 508 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CreateConsecutive(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InitUnion(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LinkLabels(), and itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LookupSet().
|
protected |
Definition at line 513 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ComputeEquivalence().
|
staticconstexpr |
Definition at line 80 of file itkScanlineFilterCommon.h.
Referenced by itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CheckNeighbors().