15#include <itksys/SystemTools.hxx>
20#include "mitkIGTException.h"
21#include "mitkIGTIOException.h"
33 if( !m_Repeat && (this->GetNumberOfSnapshots() <= i) )
35 MITK_ERROR <<
"Snaphot " << i <<
" does not exist and repat is off: can't go to that snapshot!";
36 mitkThrowException(
mitk::IGTException) <<
"Snapshot " << i <<
" does not exist and repat is off: can't go to that snapshot!";
40 m_NavigationDataSetIterator = m_NavigationDataSet->Begin() + ( i % this->GetNumberOfSnapshots() );
48 if (m_NavigationDataSetIterator == m_NavigationDataSet->End())
50 MITK_WARN(
"NavigationDataSequentialPlayer") <<
"Cannot go to next snapshot, already at end of NavigationDataset. Ignoring...";
53 ++m_NavigationDataSetIterator;
54 if ( m_NavigationDataSetIterator == m_NavigationDataSet->End() )
59 m_NavigationDataSetIterator = m_NavigationDataSet->Begin();
72 if ( m_NavigationDataSetIterator == m_NavigationDataSet->End() )
75 this->GraftEmptyOutput();
79 for (
unsigned int index = 0; index < GetNumberOfOutputs(); index++)
82 if( !output ) { mitkThrowException(
mitk::IGTException) <<
"Output of index "<<index<<
" is null."; }
84 output->
Graft(m_NavigationDataSetIterator->at(index));
92 Superclass::UpdateOutputInformation();
An object of this class represents an exception of the MITK-IGT module.
~NavigationDataSequentialPlayer() override
NavigationDataSequentialPlayer()
bool GoToNextSnapshot()
Advance the output to the next snapshot of mitk::NavigationData. Filter output is updated inside the ...
void UpdateOutputInformation() override
Used for pipeline update just to tell the pipeline that we always have to update.
void GenerateData() override
Does nothing. mitk::NavigationDataSequentialPlayer::GoToNextSnapshot() should be called for generatin...
void GoToSnapshot(unsigned int i)
Advance the output to the i-th snapshot of mitk::NavigationData. E.g. if you want to have the NavData...
void Graft(const DataObject *data) override
Graft the data and information from one NavigationData to another.