31 if ( navigationDatas.size() != m_NumberOfTools )
33 MITK_WARN(
"NavigationDataSet") <<
"Tried to add too many or too few navigation Datas to NavigationDataSet. " << m_NumberOfTools <<
" required, tried to add " << navigationDatas.size() <<
".";
38 if ( m_NavigationDataVectors.size() > 0)
40 for (std::vector<mitk::NavigationData::Pointer>::size_type i = 0; i < navigationDatas.size(); i++)
41 if (navigationDatas[i]->GetIGTTimeStamp() <= m_NavigationDataVectors.back()[i]->GetIGTTimeStamp())
43 MITK_WARN(
"NavigationDataSet") <<
"IGTTimeStamp of new NavigationData should be newer than timestamp of last NavigationData.";
48 m_NavigationDataVectors.push_back(navigationDatas);
54 if ( index >= m_NavigationDataVectors.size() )
56 MITK_WARN(
"NavigationDataSet") <<
"There is no NavigationData available at index " << index <<
".";
60 if ( toolIndex >= m_NavigationDataVectors.at(index).size() )
62 MITK_WARN(
"NavigationDataSet") <<
"There is NavigatitionData available at index " << index <<
" for tool " << toolIndex <<
".";
66 return m_NavigationDataVectors.at(index).at(toolIndex);
102 if (toolIndex >= m_NumberOfTools )
104 MITK_WARN(
"NavigationDataSet") <<
"Invalid toolIndex: " << m_NumberOfTools <<
" Tools known, requested index " << toolIndex <<
"";
105 return std::vector<mitk::NavigationData::Pointer>();
108 std::vector< mitk::NavigationData::Pointer > result;
110 for(std::vector<std::vector<NavigationData::Pointer> >::size_type i = 0; i < m_NavigationDataVectors.size(); i++)
111 result.push_back(m_NavigationDataVectors[i][toolIndex]);
118 return m_NavigationDataVectors[index];
123 return m_NumberOfTools;
128 return m_NavigationDataVectors.size();
152 return (Size() == 0);
161 return m_NavigationDataVectors.cbegin();
166 return m_NavigationDataVectors.cend();
itk::SmartPointer< Self > Pointer
NavigationData::Pointer GetNavigationDataForIndex(unsigned int index, unsigned int toolIndex) const
Get mitk::NavigationData from the given tool at given index.
virtual void SetRequestedRegion(const itk::DataObject *data) override
Set the requested region from this data object to match the requested region of the data object passe...
unsigned int Size() const
Returns the number of time steps stored in this NavigationDataSet.
DataCollection - Class to facilitate loading/accessing structured data.
virtual bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
virtual NavigationDataSetConstIterator Begin() const
Returns an iterator pointing to the first TimeStep.
virtual void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
virtual NavigationDataSetConstIterator End() const
Returns an iterator pointing behind to the last TimeStep.
virtual bool IsEmpty() const override
This overrid is probably a little hacky. See Bug 19086.
virtual std::vector< mitk::NavigationData::Pointer > GetTimeStep(unsigned int index) const
Returns a vector that contains NavigationDatas for each tool for a given timestep.
unsigned int GetNumberOfTools() const
Returns the number of tools for which NavigationDatas are stored in this set.
virtual ~NavigationDataSet()
bool AddNavigationDatas(std::vector< mitk::NavigationData::Pointer > navigationDatas)
Add mitk::NavigationData of the given tool to the Set.
virtual std::vector< mitk::NavigationData::Pointer > GetDataStreamForTool(unsigned int toolIndex)
Get last mitk::Navigation object for given tool whose timestamp is less than the given timestamp...
std::vector< std::vector< mitk::NavigationData::Pointer > >::const_iterator NavigationDataSetConstIterator
This iterator iterates over the distinct time steps in this set. And is const.
NavigationDataSet(unsigned int numTools)
Constructs set with fixed number of tools.
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.