ITK  5.0.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
itk::ScanlineFilterCommon< TInputImage, TOutputImage > Class Template Reference

#include <itkScanlineFilterCommon.h>

+ Inheritance diagram for itk::ScanlineFilterCommon< TInputImage, TOutputImage >:
+ Collaboration diagram for itk::ScanlineFilterCommon< TInputImage, TOutputImage >:

Detailed Description

template<typename TInputImage, typename TOutputImage>
class itk::ScanlineFilterCommon< TInputImage, TOutputImage >

Helper class for a group of filters which operate on scan-lines.

This implementation was taken from the Insight Journal paper: https://hdl.handle.net/1926/584 or http://www.insight-journal.org/browse/publication/176

Definition at line 42 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 &currentRun, 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 &current, 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< EnclosingFilterm_EnclosingFilter
 
bool m_FullyConnected
 
LineMapType m_LineMap
 
OffsetVectorType m_LineOffsets
 
std::mutex m_Mutex
 
std::atomic< SizeValueTypem_NumberOfLabels
 
UnionFindType m_UnionFind
 
std::deque< WorkUnitDatam_WorkUnitResults
 

Member Typedef Documentation

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CompareLinesCallback = std::function<void( const LineEncodingConstIterator& currentRun, const LineEncodingConstIterator& neighborRun, OffsetValueType oStart, OffsetValueType oLast )>
protected

Definition at line 248 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ConsecutiveVectorType = std::vector< OutputPixelType >
protected

Definition at line 137 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ConstPointer = SmartPointer< const Self >

Definition at line 49 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::EnclosingFilter = ImageToImageFilter< TInputImage, TOutputImage >

Definition at line 102 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::IndexType = typename TInputImage::IndexType

Definition at line 83 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputImageConstPointer = typename InputImageType::ConstPointer

Definition at line 82 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputImagePointer = typename InputImageType::Pointer

Definition at line 81 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputImageType = TInputImage

Definition at line 80 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputPixelType = typename TInputImage::PixelType

Definition at line 76 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InternalLabelType = SizeValueType
protected

Definition at line 113 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LineEncodingConstIterator = typename LineEncodingType::const_iterator
protected

Definition at line 129 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LineEncodingIterator = typename LineEncodingType::iterator
protected

Definition at line 128 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LineEncodingType = std::vector< RunLength >
protected

Definition at line 127 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LineMapType = std::vector< LineEncodingType >
protected

Definition at line 134 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OffsetType = typename TInputImage::OffsetType

Definition at line 85 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OffsetVectorConstIterator = typename OffsetVectorType::const_iterator
protected

Definition at line 132 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OffsetVectorType = std::vector< OffsetValueType >
protected

Definition at line 131 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputImagePixelType = typename TOutputImage::PixelType

Definition at line 93 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputImagePointer = typename OutputImageType::Pointer

Definition at line 87 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputImageType = TOutputImage

Definition at line 86 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputIndexType = typename TOutputImage::IndexType

Definition at line 90 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputOffsetType = typename TOutputImage::OffsetType

Definition at line 92 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
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 75 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputRegionType = typename TOutputImage::RegionType

Definition at line 88 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputSizeType = typename TOutputImage::SizeType

Definition at line 91 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutSizeType = typename TOutputImage::RegionType::SizeType
protected

Definition at line 114 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::Pointer = SmartPointer< Self >

Definition at line 48 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::RegionType = OutputRegionType

Definition at line 89 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::Self = ScanlineFilterCommon

Definition at line 47 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::SizeType = typename TInputImage::SizeType

Definition at line 84 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
using itk::ScanlineFilterCommon< TInputImage, TOutputImage >::UnionFindType = std::vector< InternalLabelType >
protected

Definition at line 136 of file itkScanlineFilterCommon.h.

Constructor & Destructor Documentation

template<typename TInputImage , typename TOutputImage >
itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ScanlineFilterCommon ( EnclosingFilter enclosingFilter)
inline

Definition at line 104 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
itk::ScanlineFilterCommon< TInputImage, TOutputImage >::~ScanlineFilterCommon ( )
default

Member Function Documentation

template<typename TInputImage , typename TOutputImage >
bool itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CheckNeighbors ( const OutputIndexType A,
const OutputIndexType B 
) const
inlineprotected
template<typename TInputImage , typename TOutputImage >
void itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CompareLines ( const LineEncodingType current,
const LineEncodingType Neighbour,
bool  sameLineOffset,
bool  labelCompare,
OutputPixelType  background,
CompareLinesCallback  callback 
)
inlineprotected
template<typename TInputImage , typename TOutputImage >
void itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ComputeEquivalence ( const SizeValueType  workUnitResultsIndex,
bool  strictlyLess 
)
inlineprotected
template<typename TInputImage , typename TOutputImage >
SizeValueType itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CreateConsecutive ( OutputPixelType  backgroundValue)
inlineprotected
template<typename TInputImage , typename TOutputImage >
WorkUnitData itk::ScanlineFilterCommon< TInputImage, TOutputImage >::CreateWorkUnitData ( const RegionType outputRegionForThread)
inlineprotected
template<typename TInputImage , typename TOutputImage >
SizeValueType itk::ScanlineFilterCommon< TInputImage, TOutputImage >::IndexToLinearIndex ( const IndexType index) const
inlineprotected
template<typename TInputImage , typename TOutputImage >
void itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InitUnion ( InternalLabelType  numberOfLabels)
inlineprotected
template<typename TInputImage , typename TOutputImage >
void itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LinkLabels ( const InternalLabelType  label1,
const InternalLabelType  label2 
)
inlineprotected
template<typename TInputImage , typename TOutputImage >
InternalLabelType itk::ScanlineFilterCommon< TInputImage, TOutputImage >::LookupSet ( const InternalLabelType  label)
inlineprotected
template<typename TInputImage , typename TOutputImage >
static Pointer itk::ScanlineFilterCommon< TInputImage, TOutputImage >::New ( )
inlinestatic
template<typename TInputImage , typename TOutputImage >
void itk::ScanlineFilterCommon< TInputImage, TOutputImage >::Register ( ) const
inline
template<typename TInputImage , typename TOutputImage >
void itk::ScanlineFilterCommon< TInputImage, TOutputImage >::SetupLineOffsets ( bool  wholeNeighborhood)
inlineprotected
template<typename TInputImage , typename TOutputImage >
void itk::ScanlineFilterCommon< TInputImage, TOutputImage >::UnRegister ( ) const
inlinenoexcept

Member Data Documentation

template<typename TInputImage , typename TOutputImage >
constexpr unsigned int itk::ScanlineFilterCommon< TInputImage, TOutputImage >::ImageDimension = TOutputImage::ImageDimension
static
template<typename TInputImage , typename TOutputImage >
constexpr unsigned int itk::ScanlineFilterCommon< TInputImage, TOutputImage >::InputImageDimension = TInputImage::ImageDimension
static

Definition at line 79 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
ConsecutiveVectorType itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_Consecutive
protected
template<typename TInputImage , typename TOutputImage >
WeakPointer<EnclosingFilter> itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_EnclosingFilter
protected
template<typename TInputImage , typename TOutputImage >
bool itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_FullyConnected
protected
template<typename TInputImage , typename TOutputImage >
LineMapType itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_LineMap
protected
template<typename TInputImage , typename TOutputImage >
OffsetVectorType itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_LineOffsets
protected
template<typename TInputImage , typename TOutputImage >
std::mutex itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_Mutex
protected
template<typename TInputImage , typename TOutputImage >
std::atomic< SizeValueType > itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_NumberOfLabels
protected

Definition at line 509 of file itkScanlineFilterCommon.h.

template<typename TInputImage , typename TOutputImage >
UnionFindType itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_UnionFind
protected
template<typename TInputImage , typename TOutputImage >
std::deque< WorkUnitData > itk::ScanlineFilterCommon< TInputImage, TOutputImage >::m_WorkUnitResults
protected
template<typename TInputImage , typename TOutputImage >
constexpr unsigned int itk::ScanlineFilterCommon< TInputImage, TOutputImage >::OutputImageDimension = TOutputImage::ImageDimension
static

The documentation for this class was generated from the following file: