ITK
6.0.0
Insight Toolkit
|
#include <itkRingBuffer.h>
Templated ring buffer for holding anything.
This ring buffer can hold any type of itk class that supports smart pointers. A HEAD pointer is maintained and the buffer pointers can be accessed in order using either positive or negative offsets. The HEAD pointer can also be moved forward or backward in the ring.
Definition at line 40 of file itkRingBuffer.h.
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | ElementPointer = typename ElementType::Pointer |
using | ElementType = TElement |
using | OffsetValueType = itk::OffsetValueType |
using | Pointer = SmartPointer< Self > |
using | Self = RingBuffer |
using | SizeValueType = itk::SizeValueType |
using | Superclass = Object |
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 | |
bool | BufferIsFull (OffsetValueType offset) |
ElementType::Pointer | GetBufferContents (OffsetValueType offset) |
SizeValueType | GetHeadIndex () |
const char * | GetNameOfClass () const override |
SizeValueType | GetNumberOfBuffers () |
void | MoveHead (OffsetValueType offset) |
void | SetBufferContents (OffsetValueType offset, ElementPointer element) |
void | SetNumberOfBuffers (SizeValueType n) |
void | MoveHeadForward () |
void | MoveHeadBackward () |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
const char * | GetNameOfClass () const override |
virtual const TimeStamp & | GetTimeStamp () 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) const |
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 Pointer | CreateAnother () const |
virtual void | Delete () |
virtual const char * | GetNameOfClass () const |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const noexcept |
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 () |
Protected Member Functions | |
OffsetValueType | GetOffsetBufferIndex (OffsetValueType offset) |
RingBuffer () | |
~RingBuffer () override=default | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Protected Attributes | |
SizeValueType | m_HeadIndex { 0 } |
std::vector< ElementPointer > | m_PointerVector {} |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
using itk::RingBuffer< TElement >::ConstPointer = SmartPointer<const Self> |
Definition at line 51 of file itkRingBuffer.h.
using itk::RingBuffer< TElement >::ElementPointer = typename ElementType::Pointer |
Definition at line 55 of file itkRingBuffer.h.
using itk::RingBuffer< TElement >::ElementType = TElement |
Contained type
Definition at line 54 of file itkRingBuffer.h.
using itk::RingBuffer< TElement >::OffsetValueType = itk::OffsetValueType |
Definition at line 58 of file itkRingBuffer.h.
using itk::RingBuffer< TElement >::Pointer = SmartPointer<Self> |
Definition at line 50 of file itkRingBuffer.h.
using itk::RingBuffer< TElement >::Self = RingBuffer |
-TYPEDEFS------------------------------------------------------------— Standard class type aliases
Definition at line 48 of file itkRingBuffer.h.
using itk::RingBuffer< TElement >::SizeValueType = itk::SizeValueType |
Definition at line 57 of file itkRingBuffer.h.
using itk::RingBuffer< TElement >::Superclass = Object |
Definition at line 49 of file itkRingBuffer.h.
|
protected |
-PROTECTED METHODS---------------------------------------------------—
|
overrideprotecteddefault |
-PROTECTED METHODS---------------------------------------------------—
bool itk::RingBuffer< TElement >::BufferIsFull | ( | OffsetValueType | offset | ) |
Report whether or not the indicated buffer is full
ElementType::Pointer itk::RingBuffer< TElement >::GetBufferContents | ( | OffsetValueType | offset | ) |
Access the data from the indicated buffer
|
inline |
Report the current position of Head (mostly used for testing)
Definition at line 93 of file itkRingBuffer.h.
|
overridevirtual |
Reimplemented from itk::Object.
SizeValueType itk::RingBuffer< TElement >::GetNumberOfBuffers | ( | ) |
Get the buffer size
|
protected |
Get the proper buffer index from an offset
void itk::RingBuffer< TElement >::MoveHead | ( | OffsetValueType | offset | ) |
Move the Head pointer along the ring using the given offset
void itk::RingBuffer< TElement >::MoveHeadBackward | ( | ) |
Convenience methods for moving Head +/- 1
void itk::RingBuffer< TElement >::MoveHeadForward | ( | ) |
Convenience methods for moving Head +/- 1
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
-PROTECTED METHODS---------------------------------------------------—
Reimplemented from itk::Object.
void itk::RingBuffer< TElement >::SetBufferContents | ( | OffsetValueType | offset, |
ElementPointer | element | ||
) |
Set the buffer contents of a buffer
void itk::RingBuffer< TElement >::SetNumberOfBuffers | ( | SizeValueType | n | ) |
Set the number of buffers WARNING: If the size is set smaller than the current buffer size, the tail of the buffer will be chopped off
|
protected |
-PROTECTED MEMBERS---------------------------------------------------— Pointer to the current active buffer
Definition at line 121 of file itkRingBuffer.h.
|
protected |
Vector of pointers to elements
Definition at line 124 of file itkRingBuffer.h.