17 : m_NumberOfInputs(0),
18 m_NavigationDataSet(nullptr),
20 m_StandardizeTime(false),
21 m_StandardizedTimeInitialized(false),
22 m_RecordCountLimit(-1),
23 m_RecordOnlyValidData(false)
36 DataObjectPointerArray inputs = this->GetIndexedInputs();
39 std::vector< mitk::NavigationData::Pointer > clonedDatas;
41 bool atLeastOneInputIsInvalid =
false;
44 for (
unsigned int index=0; index < inputs.size(); index++)
52 if (atLeastOneInputIsInvalid || !this->
GetInput(index)->IsDataValid())
54 atLeastOneInputIsInvalid =
true;
60 clonedDatas.push_back(clone);
65 clonedDatas[index]->SetIGTTimeStamp(igtTimestamp);
85 MITK_WARN <<
"Already recording please stop before start new recording session";
103 std::cout <<
"You have to start a recording first" << std::endl;
virtual void StartRecording()
Starts recording NavigationData into the NavigationDataSet.
virtual void ResetRecording()
Resets the Datasets and the timestamp, so a new recording can happen.
NavigationData * GetOutput(void)
return the output (output with id 0) of the filter
bool m_Recording
indicates whether the recording is started or not
double GetElapsed()
returns the time elapsed since calling Start() for the first time in milliseconds ...
int m_RecordCountLimit
limits the number of frames, recording will be stopped if the limit is reached. -1 disables the limit...
bool m_StandardizedTimeInitialized
set to true the first time start recording is called.
virtual void StopRecording()
Stops StopsRecording to the NavigationDataSet.
virtual int GetNumberOfRecordedSteps()
Returns the number of time steps that were recorded in the current set. Warning: This Method does NOT...
~NavigationDataRecorder() override
const NavigationData * GetInput(void) const
Get the input of this filter.
double TimeStampType
type that holds the time at which the data was recorded in milliseconds
bool m_StandardizeTime
indicates whether one should use the timestamps in NavigationData or create new timestamps upon recor...
static void clone(T *&dst, S *src, int n)
static IGTTimeStamp * GetInstance()
returns a pointer to the current instance of mitkTimeStamp
void Start(itk::Object::Pointer device)
starts the time-acquisition
bool m_RecordOnlyValidData
indicates whether only valid data is recorded
void Graft(const DataObject *data) override
Graft the data and information from one NavigationData to another.
void Stop(itk::Object::Pointer device)
stops the time-acqusition
void GenerateData() override
mitk::NavigationDataSet::Pointer m_NavigationDataSet