ITK  5.2.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
itk::SparseFieldLayer< TNodeType > Class Template Reference

#include <itkSparseFieldLayer.h>

+ Inheritance diagram for itk::SparseFieldLayer< TNodeType >:
+ Collaboration diagram for itk::SparseFieldLayer< TNodeType >:

Classes

struct  RegionType
 

Public Types

using ConstIterator = ConstSparseFieldLayerIterator< NodeType >
 
using ConstPointer = SmartPointer< const Self >
 
using Iterator = SparseFieldLayerIterator< NodeType >
 
using NodeType = TNodeType
 
using Pointer = SmartPointer< Self >
 
using RegionListType = std::vector< RegionType >
 
using Self = SparseFieldLayer
 
using Superclass = Object
 
using ValueType = NodeType
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

Iterator Begin ()
 
ConstIterator Begin () const
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
Iterator End ()
 
ConstIterator End () const
 
NodeTypeFront ()
 
const NodeTypeFront () const
 
virtual const char * GetNameOfClass () const
 
void PopFront ()
 
void PushFront (NodeType *n)
 
void Unlink (NodeType *n)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
NodeTypem_HeadNode
 
unsigned int m_Size
 
bool Empty () const
 
unsigned int Size () const
 
RegionListType SplitRegions (int num) const
 
 SparseFieldLayer ()
 
 ~SparseFieldLayer () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

Additional Inherited Members

- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TNodeType>
class itk::SparseFieldLayer< TNodeType >

A very simple linked list that is used to manage nodes in a layer of a sparse field level-set solver.

This class implements a very simple linked list that is used to manage nodes in a layer of a sparse field level-set solver. For more information on the sparse field level-set solver, see documentation for itk::SparseFieldLevelSetImageFilter.
IMPORTANT!
One important and distinctive feature of this list implementation (in fact, the entire reason for this object's existence) is that no memory allocation/deallocation occurs during linking or unlinking of nodes. The nodes themselves are expected to carry the appropriate "Next" & "Previous" fields used to link. Guaranteeing that no calls to new or delete are ever made for normal list operations allows us to safely use this class in a multithread environment without incurring penalties from heap contention among threads. Because no allocation/deallocation occurs, it is entirely up to the calling program to manage the allocating and freeing of the list nodes.

Definition at line 172 of file itkSparseFieldLayer.h.

Member Typedef Documentation

◆ ConstIterator

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::ConstIterator = ConstSparseFieldLayerIterator<NodeType>

Const iterator type for the list.

Definition at line 200 of file itkSparseFieldLayer.h.

◆ ConstPointer

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::ConstPointer = SmartPointer<const Self>

Definition at line 181 of file itkSparseFieldLayer.h.

◆ Iterator

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::Iterator = SparseFieldLayerIterator<NodeType>

Iterator type for the list.

Definition at line 197 of file itkSparseFieldLayer.h.

◆ NodeType

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::NodeType = TNodeType

Type of node stored in the linked list.

Definition at line 190 of file itkSparseFieldLayer.h.

◆ Pointer

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::Pointer = SmartPointer<Self>

Definition at line 180 of file itkSparseFieldLayer.h.

◆ RegionListType

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::RegionListType = std::vector<RegionType>

Definition at line 209 of file itkSparseFieldLayer.h.

◆ Self

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::Self = SparseFieldLayer

Standard type alias.

Definition at line 178 of file itkSparseFieldLayer.h.

◆ Superclass

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::Superclass = Object

Definition at line 179 of file itkSparseFieldLayer.h.

◆ ValueType

template<typename TNodeType >
using itk::SparseFieldLayer< TNodeType >::ValueType = NodeType

Alias for the type of value stored in the list. Conforms to Standard Template Library vocabulary.

Definition at line 194 of file itkSparseFieldLayer.h.

Constructor & Destructor Documentation

◆ SparseFieldLayer()

template<typename TNodeType >
itk::SparseFieldLayer< TNodeType >::SparseFieldLayer ( )
protected

The anchor node of the list. m_HeadNode->Next is the first node in the list. If m_HeadNode->Next == m_HeadNode, then the list is empty.

◆ ~SparseFieldLayer()

template<typename TNodeType >
itk::SparseFieldLayer< TNodeType >::~SparseFieldLayer ( )
overrideprotected

The anchor node of the list. m_HeadNode->Next is the first node in the list. If m_HeadNode->Next == m_HeadNode, then the list is empty.

Member Function Documentation

◆ Begin() [1/2]

template<typename TNodeType >
Iterator itk::SparseFieldLayer< TNodeType >::Begin ( )
inline

Returns an iterator pointing to the first node in the list.

Definition at line 257 of file itkSparseFieldLayer.h.

◆ Begin() [2/2]

template<typename TNodeType >
ConstIterator itk::SparseFieldLayer< TNodeType >::Begin ( ) const
inline

Returns a const iterator pointing to the first node in the list.

Definition at line 265 of file itkSparseFieldLayer.h.

◆ CreateAnother()

template<typename TNodeType >
virtual::itk::LightObject::Pointer itk::SparseFieldLayer< TNodeType >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ Empty()

template<typename TNodeType >
bool itk::SparseFieldLayer< TNodeType >::Empty ( ) const
inline

Returns TRUE if the list is empty, FALSE otherwise. Executes in constant time.

Definition at line 287 of file itkSparseFieldLayer.h.

◆ End() [1/2]

template<typename TNodeType >
Iterator itk::SparseFieldLayer< TNodeType >::End ( )
inline

Returns an iterator pointing one node past the end of the list.

Definition at line 272 of file itkSparseFieldLayer.h.

◆ End() [2/2]

template<typename TNodeType >
ConstIterator itk::SparseFieldLayer< TNodeType >::End ( ) const
inline

Returns a const iterator pointing one node past the end of the list.

Definition at line 279 of file itkSparseFieldLayer.h.

◆ Front() [1/2]

template<typename TNodeType >
NodeType* itk::SparseFieldLayer< TNodeType >::Front ( )
inline

Returns a pointer to the first node in the list. Constant time.

Definition at line 214 of file itkSparseFieldLayer.h.

◆ Front() [2/2]

template<typename TNodeType >
const NodeType* itk::SparseFieldLayer< TNodeType >::Front ( ) const
inline

Returns a const pointer to the first node in the list. Constant time.

Definition at line 221 of file itkSparseFieldLayer.h.

◆ GetNameOfClass()

template<typename TNodeType >
virtual const char* itk::SparseFieldLayer< TNodeType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

◆ New()

template<typename TNodeType >
static Pointer itk::SparseFieldLayer< TNodeType >::New ( )
static

Method for creation through the object factory.

◆ PopFront()

template<typename TNodeType >
void itk::SparseFieldLayer< TNodeType >::PopFront ( )
inline

Unlinks the first node from the list. Constant time.

Definition at line 228 of file itkSparseFieldLayer.h.

◆ PrintSelf()

template<typename TNodeType >
void itk::SparseFieldLayer< TNodeType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

The anchor node of the list. m_HeadNode->Next is the first node in the list. If m_HeadNode->Next == m_HeadNode, then the list is empty.

Reimplemented from itk::Object.

◆ PushFront()

template<typename TNodeType >
void itk::SparseFieldLayer< TNodeType >::PushFront ( NodeType n)
inline

Links a node into the front of the list. Constant time.

Definition at line 237 of file itkSparseFieldLayer.h.

◆ Size()

template<typename TNodeType >
unsigned int itk::SparseFieldLayer< TNodeType >::Size ( ) const

Returns the number of elements in the list. Size() executes in constant time.

◆ SplitRegions()

template<typename TNodeType >
RegionListType itk::SparseFieldLayer< TNodeType >::SplitRegions ( int  num) const

Returns pointers to first and last+1 elements of num partitions of the itkSparseFieldLayer

◆ Unlink()

template<typename TNodeType >
void itk::SparseFieldLayer< TNodeType >::Unlink ( NodeType n)
inline

Unlinks a node from the list

Definition at line 248 of file itkSparseFieldLayer.h.

Member Data Documentation

◆ m_HeadNode

template<typename TNodeType >
NodeType* itk::SparseFieldLayer< TNodeType >::m_HeadNode
private

The anchor node of the list. m_HeadNode->Next is the first node in the list. If m_HeadNode->Next == m_HeadNode, then the list is empty.

Definition at line 319 of file itkSparseFieldLayer.h.

◆ m_Size

template<typename TNodeType >
unsigned int itk::SparseFieldLayer< TNodeType >::m_Size
private

The anchor node of the list. m_HeadNode->Next is the first node in the list. If m_HeadNode->Next == m_HeadNode, then the list is empty.

Definition at line 320 of file itkSparseFieldLayer.h.


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