MITK-IGT
IGT Extension of MITK
|
This class is a NavigationDataPlayer which can play CSV formatted files in sequential order, which means it doesn't care about timestamps and just outputs the navigationdatas in their sequential order. More...
#include <mitkNavigationDataCSVSequentialPlayer.h>
Public Types | |
enum | Filetype { NavigationDataCSV , ManualLoggingCSV } |
Public Member Functions | |
mitkClassMacro (NavigationDataCSVSequentialPlayer, NavigationDataPlayerBase) | |
itkNewMacro (Self) | |
void | SetFileName (const std::string &_FileName) |
sets the file name and path (if XMLString is set, this is neglected) | |
void | SetOptions (bool rightHanded, char seperatorSign, int sampleCount, bool headerRow, int xPos, int yPos, int zPos, bool useQuats, int qx, int qy, int qz, int qr, int azimuth, int elevatino, int roll, bool eulerInRadiants, int minNumberOfColums) |
SetOptions sets the options for reading out the data out of the correct positions of the file. They need to be set before using the player. | |
itkGetStringMacro (FileName) | |
returns the file name and path | |
itkSetMacro (Filetype, Filetype) | |
Sets the file type. ManualLoggingCSV is default and is thought for your custom csv files. You can also set it to NavigationDataCSV, then this player interprets MITK style csv files. | |
bool | IsAtEnd () |
void | UpdateOutputInformation () override |
Used for pipeline update just to tell the pipeline that we always have to update. | |
int | GetNumberOfSnapshots () |
![]() | |
mitkClassMacro (NavigationDataPlayerBase, NavigationDataSource) | |
itkSetMacro (Repeat, bool) | |
Set to true if the data player should repeat the outputs. | |
itkGetMacro (Repeat, bool) | |
void | UpdateOutputInformation () override |
Used for pipeline update just to tell the pipeline that we always have to update. | |
itkGetMacro (NavigationDataSet, NavigationDataSet::Pointer) | |
void | SetNavigationDataSet (NavigationDataSet::Pointer navigationDataSet) |
Set mitk::NavigationDataSet for playing. Player is initialized by call to mitk::NavigationDataPlayerBase::InitPlayer() inside this method. Method must be called before this object can be used as a filter source. | |
unsigned int | GetNumberOfSnapshots () |
Getter for the size of the mitk::NavigationDataSet used in this object. | |
unsigned int | GetCurrentSnapshotNumber () |
bool | IsAtEnd () |
This method checks if player arrived at end of file. | |
![]() | |
mitkClassMacroItkParent (NavigationDataSource, itk::ProcessObject) | |
itkGetMacro (Name, std::string) | |
itkSetMacro (Name, std::string) | |
Sets the human readable name of this source. There is also a default name, but you can use this method if you need to define it on your own. | |
NavigationData * | GetOutput (void) |
return the output (output with id 0) of the filter | |
NavigationData * | GetOutput (DataObjectPointerArraySizeType idx) |
return the output with id idx of the filter | |
NavigationData * | GetOutput (const std::string &navDataName) |
return the output with name navDataName of the filter | |
NavigationTool::Pointer | GetToolMetaData (DataObjectPointerArraySizeType idx) |
NavigationTool::Pointer | GetToolMetaData (const std::string &navDataName) |
itkGetMacro (ToolMetaDataCollection, mitk::NavigationToolStorage::Pointer) | |
itkSetMacro (ToolMetaDataCollection, mitk::NavigationToolStorage::Pointer) | |
DataObjectPointerArraySizeType | GetOutputIndex (std::string navDataName) |
return the index of the output with name navDataName, -1 if no output with that name was found | |
virtual void | RegisterAsMicroservice () |
Registers this object as a Microservice, making it available to every module and/or plugin. To unregister, call UnregisterMicroservice(). | |
virtual void | UnRegisterMicroservice () |
Registers this object as a Microservice, making it available to every module and/or plugin. | |
std::string | GetMicroserviceID () |
Returns the id that this device is registered with. The id will only be valid, if the NavigationDataSource has been registered using RegisterAsMicroservice(). | |
virtual void | GraftNthOutput (unsigned int idx, itk::DataObject *graft) |
Graft the specified DataObject onto this ProcessObject's output. | |
virtual void | GraftOutput (itk::DataObject *graft) |
Graft the specified DataObject onto this ProcessObject's output. | |
itk::DataObject::Pointer | MakeOutput (DataObjectPointerArraySizeType idx) override |
itk::DataObject::Pointer | MakeOutput (const DataObjectIdentifierType &name) override |
virtual void | SetParameters (const mitk::PropertyList *) |
Set all filter parameters as the PropertyList p. | |
virtual mitk::PropertyList::ConstPointer | GetParameters () const |
Get all filter parameters as a PropertyList. | |
virtual void | Freeze () |
virtual void | UnFreeze () |
itkGetMacro (IsFrozen, bool) | |
Protected Member Functions | |
NavigationDataCSVSequentialPlayer () | |
~NavigationDataCSVSequentialPlayer () override | |
void | GenerateData () override |
std::vector< mitk::NavigationData::Pointer > | GetNavigationDatasFromFile (std::string filename) |
std::vector< std::string > | GetFileContentLineByLine (std::string filename) |
mitk::NavigationData::Pointer | GetNavigationDataOutOfOneLine (std::string line) |
void | FillOutputEmpty (int number) |
mitk::NavigationData::Pointer | GetEmptyNavigationData () |
![]() | |
NavigationDataPlayerBase () | |
~NavigationDataPlayerBase () override | |
void | InitPlayer () |
Initializes the outputs of this NavigationDataSource. Aftwer calling this method, the first Navigationdata from the loaded Navigationdataset is loaded into the outputs. | |
void | GraftEmptyOutput () |
Convenience method for subclasses. When there are no further mitk::NavigationData objects available, this method can be called in the implementation of mitk::NavigationDataPlayerBase::GenerateData(). | |
![]() | |
NavigationDataSource () | |
~NavigationDataSource () override | |
Protected Attributes | |
std::string | m_FileName |
int | m_CurrentPos |
Filetype | m_Filetype |
std::vector< mitk::NavigationData::Pointer > | m_NavigationDatas |
bool | m_RightHanded |
char | m_SeparatorSign |
int | m_SampleCount |
bool | m_HeaderRow |
int | m_XPos |
int | m_YPos |
int | m_ZPos |
bool | m_UseQuats |
int | m_Qx |
int | m_Qy |
int | m_Qz |
int | m_Qr |
int | m_Azimuth |
int | m_Elevation |
int | m_Roll |
bool | m_EulersInRadiants |
int | m_MinNumberOfColumns |
![]() | |
bool | m_Repeat |
If the player should repeat outputs. Default is false. | |
NavigationDataSet::Pointer | m_NavigationDataSet |
mitk::NavigationDataSet::NavigationDataSetConstIterator | m_NavigationDataSetIterator |
Iterator always points to the NavigationData object which is in the outputs at the moment. | |
![]() | |
std::string | m_Name |
bool | m_IsFrozen |
NavigationToolStorage::Pointer | m_ToolMetaDataCollection |
Additional Inherited Members | |
![]() | |
static const std::string | US_INTERFACE_NAME = "org.mitk.services.NavigationDataSource" |
These Constants are used in conjunction with Microservices. | |
static const std::string | US_PROPKEY_DEVICENAME = US_INTERFACE_NAME + ".devicename" |
static const std::string | US_PROPKEY_ID = US_INTERFACE_NAME + ".id" |
static const std::string | US_PROPKEY_ISACTIVE = US_INTERFACE_NAME + ".isActive" |
This class is a NavigationDataPlayer which can play CSV formatted files in sequential order, which means it doesn't care about timestamps and just outputs the navigationdatas in their sequential order.
Documentation
It is thought to interpret custom csv files. To do so please adapt the column numbers of position and orientation in the internal method GetNavigationDataOutOfOneLine().
So far only one (the first) tool is read in as required for the hummel protocol measurements.
This class can also interpret MITK style csv files (set filetype to NavigationDataCSV), but you can also use the MITK navigation data player class inside the MITK-IGT module which is newer and better maintained.
Definition at line 38 of file mitkNavigationDataCSVSequentialPlayer.h.
Enumerator | |
---|---|
NavigationDataCSV | |
ManualLoggingCSV |
Definition at line 79 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 19 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
overrideprotected |
Definition at line 28 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
protected |
Definition at line 49 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
overrideprotectedvirtual |
do the work here
Implements mitk::NavigationDataPlayerBase.
Definition at line 70 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
protected |
Definition at line 54 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
protected |
Definition at line 109 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
protected |
Definition at line 149 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
protected |
Definition at line 93 of file mitkNavigationDataCSVSequentialPlayer.cpp.
int mitk::NavigationDataCSVSequentialPlayer::GetNumberOfSnapshots | ( | ) |
Definition at line 66 of file mitkNavigationDataCSVSequentialPlayer.cpp.
bool mitk::NavigationDataCSVSequentialPlayer::IsAtEnd | ( | ) |
Definition at line 32 of file mitkNavigationDataCSVSequentialPlayer.cpp.
mitk::NavigationDataCSVSequentialPlayer::itkGetStringMacro | ( | FileName | ) |
returns the file name and path
mitk::NavigationDataCSVSequentialPlayer::itkNewMacro | ( | Self | ) |
Sets the file type. ManualLoggingCSV is default and is thought for your custom csv files. You can also set it to NavigationDataCSV, then this player interprets MITK style csv files.
mitk::NavigationDataCSVSequentialPlayer::mitkClassMacro | ( | NavigationDataCSVSequentialPlayer | , |
NavigationDataPlayerBase | ) |
void mitk::NavigationDataCSVSequentialPlayer::SetFileName | ( | const std::string & | _FileName | ) |
sets the file name and path (if XMLString is set, this is neglected)
Definition at line 37 of file mitkNavigationDataCSVSequentialPlayer.cpp.
void mitk::NavigationDataCSVSequentialPlayer::SetOptions | ( | bool | rightHanded, |
char | seperatorSign, | ||
int | sampleCount, | ||
bool | headerRow, | ||
int | xPos, | ||
int | yPos, | ||
int | zPos, | ||
bool | useQuats, | ||
int | qx, | ||
int | qy, | ||
int | qz, | ||
int | qr, | ||
int | azimuth, | ||
int | elevatino, | ||
int | roll, | ||
bool | eulerInRadiants, | ||
int | minNumberOfColums ) |
SetOptions sets the options for reading out the data out of the correct positions of the file. They need to be set before using the player.
rightHanded | true if the used coordinate System is right handed, false if it is left handed |
seperatorSign | symbol that is used to separate the values in the .csv file |
sampleCount | every n-th sample in the file that should be used |
headerRow | true if the .csv file has a header row otherwise false |
xPos | number of the column in the .csv file for the x-coordinates of the position |
yPos | number of the column in the .csv file for the y-coordinates of the position |
zPos | number of the column in the .csv file for the z-coordinates of the position |
useQuats | true if Quaternions are used to construct the orientation, false if Euler Angles are used |
qx | number of the column in the .csv file for the x component of the quaternion |
qy | number of the column in the .csv file for the y component of the quaternion |
qz | number of the column in the .csv file for the z component of the quaternion |
qr | number of the column in the .csv file for the r component of the quaternion |
azimuth | number of the column in the .csv file for Azimuth (Euler Angles). Set < 0 if angle is not defined |
elevatino | number of the column in the .csv file for Elevation (Euler Angles) Set < 0 if angle is not defined |
roll | number of the column in the .csv file for Roll (Euler Angles) Set < 0 if angle is not defined |
eulerInRadiants | true if the Euler Angles in the .csv file are in radiants, false if they are in degrees |
minNumberOfColumns |
Definition at line 289 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
override |
Used for pipeline update just to tell the pipeline that we always have to update.
Definition at line 87 of file mitkNavigationDataCSVSequentialPlayer.cpp.
|
protected |
Definition at line 140 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 115 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 141 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 143 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 113 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 116 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 131 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 144 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 119 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 139 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 136 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 137 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 138 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 128 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 142 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 130 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 129 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 135 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 132 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 133 of file mitkNavigationDataCSVSequentialPlayer.h.
|
protected |
Definition at line 134 of file mitkNavigationDataCSVSequentialPlayer.h.