NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | Protected Member Functions | List of all members
niftk::IGIWaitForSavedDataSourceBuffer Class Reference

Manages a buffer of niftk::IGIDataType, where the buffer will not delete things that have not yet been saved, thereby allowing for independent save/cleardown threads. More...

Inheritance diagram for niftk::IGIWaitForSavedDataSourceBuffer:
Inheritance graph
[legend]
Collaboration diagram for niftk::IGIWaitForSavedDataSourceBuffer:
Collaboration graph
[legend]

Public Member Functions

 mitkClassMacroItkParent (IGIWaitForSavedDataSourceBuffer, IGIDataSourceBuffer) mitkNewMacro2Param(IGIWaitForSavedDataSourceBuffer
 
IGIBufferedSaveableDataSourceI
*virtual void 
CleanBuffer () override
 Clears down the buffer, opting not to delete an item if the item has not yet been saved. More...
 
virtual void SaveBuffer ()
 Saves items in the buffer. More...
 
- Public Member Functions inherited from niftk::IGIDataSourceBuffer
 mitkClassMacroItkParent (IGIDataSourceBuffer, itk::Object) mitkNewMacro1Param(IGIDataSourceBuffer
 
BufferType::size_type QString GetName () const
 
void SetName (QString name)
 
bool Contains (const niftk::IGIDataType::IGITimeType &time) const
 Returns true if the buffer already contains a data item with an exactly matching timestamp, false otherwise. More...
 
void AddToBuffer (niftk::IGIDataType::Pointer item)
 Adds an item to the buffer, which if the calling object deletes pointers, then the buffer is effectively the owner. More...
 
void DestroyBuffer ()
 Destroy all items in the buffer. More...
 
void SetLagInMilliseconds (unsigned int milliseconds)
 Sets the lag in milliseconds. More...
 
unsigned int GetLagInMilliseconds () const
 Retrieves the lag value in milliseconds. More...
 
BufferType::size_type GetBufferSize () const
 Returns the number of items in the buffer. More...
 
niftk::IGIDataType::IGITimeType GetFirstTimeStamp () const
 Returns the time stamp of the first item in the buffer. More...
 
niftk::IGIDataType::IGITimeType GetLastTimeStamp () const
 Returns the time stamp of the last item in the buffer. More...
 
float GetFrameRate () const
 Returns the frame rate, in frames per second. More...
 
niftk::IGIDataType::Pointer GetItem (const niftk::IGIDataType::IGITimeType &time) const
 Gets the item from the buffer most closely before the specified time. More...
 

Protected Member Functions

 IGIWaitForSavedDataSourceBuffer (BufferType::size_type minSize, niftk::IGIBufferedSaveableDataSourceI *source)
 
virtual ~IGIWaitForSavedDataSourceBuffer ()
 
 IGIWaitForSavedDataSourceBuffer (const IGIWaitForSavedDataSourceBuffer &)
 
IGIWaitForSavedDataSourceBufferoperator= (const IGIWaitForSavedDataSourceBuffer &)
 
- Protected Member Functions inherited from niftk::IGIDataSourceBuffer
 IGIDataSourceBuffer (BufferType::size_type minSize)
 
virtual ~IGIDataSourceBuffer ()
 
 IGIDataSourceBuffer (const IGIDataSourceBuffer &)
 
IGIDataSourceBufferoperator= (const IGIDataSourceBuffer &)
 

Additional Inherited Members

- Public Types inherited from niftk::IGIDataSourceBuffer
typedef std::set
< niftk::IGIDataType::Pointer,
TimeStampComparator
BufferType
 
- Protected Attributes inherited from niftk::IGIDataSourceBuffer
itk::FastMutexLock::Pointer m_Mutex
 
BufferType m_Buffer
 
BufferType::iterator m_BufferIterator
 
BufferType::size_type m_MinimumSize
 
QString m_Name
 

Detailed Description

Manages a buffer of niftk::IGIDataType, where the buffer will not delete things that have not yet been saved, thereby allowing for independent save/cleardown threads.

Note: This class MUST be thread-safe.

Note: All errors should thrown as mitk::Exception or sub-classes thereof.

Constructor & Destructor Documentation

niftk::IGIWaitForSavedDataSourceBuffer::IGIWaitForSavedDataSourceBuffer ( BufferType::size_type  minSize,
niftk::IGIBufferedSaveableDataSourceI source 
)
protected
niftk::IGIWaitForSavedDataSourceBuffer::~IGIWaitForSavedDataSourceBuffer ( )
protectedvirtual
niftk::IGIWaitForSavedDataSourceBuffer::IGIWaitForSavedDataSourceBuffer ( const IGIWaitForSavedDataSourceBuffer )
protected

Member Function Documentation

void niftk::IGIWaitForSavedDataSourceBuffer::CleanBuffer ( )
overridevirtual

Clears down the buffer, opting not to delete an item if the item has not yet been saved.

Reimplemented from niftk::IGIDataSourceBuffer.

niftk::IGIWaitForSavedDataSourceBuffer::mitkClassMacroItkParent ( IGIWaitForSavedDataSourceBuffer  ,
IGIDataSourceBuffer   
)
IGIWaitForSavedDataSourceBuffer& niftk::IGIWaitForSavedDataSourceBuffer::operator= ( const IGIWaitForSavedDataSourceBuffer )
protected
void niftk::IGIWaitForSavedDataSourceBuffer::SaveBuffer ( )
virtual

Saves items in the buffer.


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