Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

mitk::NavigationData Class Reference

Navigation Data. More...

#include <mitkNavigationData.h>

List of all members.

Public Types

typedef NavigationData Self
typedef itk::DataObject Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer
typedef mitk::Point3D PositionType
 Type that holds the position part of the tracking data.
typedef mitk::Quaternion OrientationType
 Type that holds the orientation part of the tracking data.
typedef itk::Matrix
< mitk::ScalarType, 6, 6 > 
CovarianceMatrixType
 type that holds the error characterization of the position and orientation measurements
typedef double TimeStampType
 type that holds the time at which the data was recorded

Public Member Functions

virtual const char * GetClassName () const
virtual void SetPosition (PositionType _arg)
virtual PositionType GetPosition () const
 sets the position of the NavigationData object
virtual void SetOrientation (OrientationType _arg)
 returns position of the NavigationData object
virtual OrientationType GetOrientation () const
 sets the orientation of the NavigationData object
virtual bool IsDataValid () const
 returns the orientation of the NavigationData object
virtual void SetDataValid (bool _arg)
virtual void SetTimeStamp (TimeStampType _arg)
 sets the overall error estimation of the NavigationData object
virtual TimeStampType GetTimeStamp () const
 sets the timestamp of the NavigationData object
virtual void SetHasPosition (bool _arg)
 gets the timestamp of the NavigationData object
virtual bool GetHasPosition () const
 sets the HasPosition flag of the NavigationData object
virtual void SetHasOrientation (bool _arg)
 gets the HasPosition flag of the NavigationData object
virtual bool GetHasOrientation () const
 sets the HasOrientation flag of the NavigationData object
virtual void SetCovErrorMatrix (CovarianceMatrixType _arg)
 gets the HasOrientation flag of the NavigationData object
virtual CovarianceMatrixType GetCovErrorMatrix () const
 sets the 6x6 Error Covariance Matrix of the NavigationData object
virtual void SetName (const char *_arg)
 gets the 6x6 Error Covariance Matrix of the NavigationData object
virtual const char * GetName () const
 set the name of the NavigationData object
virtual void Graft (const DataObject *data)
 returns the name of the NavigationData object
virtual void CopyInformation (const DataObject *data)
 copy meta data of a NavigationData object
void PrintSelf (std::ostream &os, itk::Indent indent) const
 print object information
void SetPositionAccuracy (mitk::ScalarType error)
void SetOrientationAccuracy (mitk::ScalarType error)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 NavigationData ()
virtual ~NavigationData ()

Protected Attributes

PositionType m_Position
 holds the position part of the tracking data
OrientationType m_Orientation
 holds the orientation part of the tracking data
CovarianceMatrixType m_CovErrorMatrix
 A 6x6 covariance matrix parameterizing the Gaussian error distribution of the measured position and orientation.
bool m_HasPosition
 defines if position part of m_CovErrorMatrix is valid
bool m_HasOrientation
 defines if orientation part of m_CovErrorMatrix is valid
bool m_DataValid
 defines if the object contains valid values
TimeStampType m_TimeStamp
 contains the time at which the tracking data was recorded
std::string m_Name
 name of the navigation data

Detailed Description

Navigation Data.

Documentation This class represents the data object that is passed through the MITK-IGT navigation filter pipeline. It encapsulates position and orientation of a tracked tool/sensor. Additionally, it contains a data structure that contains error/plausibility information

Definition at line 36 of file mitkNavigationData.h.


Member Typedef Documentation

typedef itk::SmartPointer<const Self> mitk::NavigationData::ConstPointer

Definition at line 39 of file mitkNavigationData.h.

typedef itk::Matrix<mitk::ScalarType,6,6> mitk::NavigationData::CovarianceMatrixType

type that holds the error characterization of the position and orientation measurements

Definition at line 43 of file mitkNavigationData.h.

typedef mitk::Quaternion mitk::NavigationData::OrientationType

Type that holds the orientation part of the tracking data.

Definition at line 42 of file mitkNavigationData.h.

typedef itk::SmartPointer<Self> mitk::NavigationData::Pointer

Definition at line 39 of file mitkNavigationData.h.

typedef mitk::Point3D mitk::NavigationData::PositionType

Type that holds the position part of the tracking data.

Definition at line 40 of file mitkNavigationData.h.

Definition at line 39 of file mitkNavigationData.h.

typedef itk::DataObject mitk::NavigationData::Superclass

Definition at line 39 of file mitkNavigationData.h.

type that holds the time at which the data was recorded

Definition at line 44 of file mitkNavigationData.h.


Constructor & Destructor Documentation

mitk::NavigationData::NavigationData (  ) [protected]

Definition at line 21 of file mitkNavigationData.cpp.

References m_CovErrorMatrix, and m_Position.

                                   : itk::DataObject(), 
m_Position(), m_Orientation(0.0, 0.0, 0.0, 0.0), m_CovErrorMatrix(),
m_HasPosition(true), m_HasOrientation(true), m_DataValid(false), m_TimeStamp(0.0),
m_Name()
{
  m_Position.Fill(0.0);
  m_CovErrorMatrix.SetIdentity();
}
mitk::NavigationData::~NavigationData (  ) [protected, virtual]

Definition at line 30 of file mitkNavigationData.cpp.

{
}

Member Function Documentation

void mitk::NavigationData::CopyInformation ( const DataObject *  data ) [virtual]

copy meta data of a NavigationData object

copies all meta data from NavigationData data to this object

Definition at line 88 of file mitkNavigationData.cpp.

{
  this->Superclass::CopyInformation( data );

  const Self * nd = NULL;
  try
  {
    nd = dynamic_cast<const Self*>(data);
  }
  catch( ... )
  {
    // data could not be cast back down
    itkExceptionMacro(<< "mitk::NavigationData::CopyInformation() cannot cast "
      << typeid(data).name() << " to "
      << typeid(Self*).name() );
  }
  if ( !nd )
  {
    // pointer could not be cast back down
    itkExceptionMacro(<< "mitk::NavigationData::CopyInformation() cannot cast "
      << typeid(data).name() << " to "
      << typeid(Self*).name() );
  }
  /* copy all meta data */
}
virtual const char* mitk::NavigationData::GetClassName (  ) const [virtual]
virtual CovarianceMatrixType mitk::NavigationData::GetCovErrorMatrix (  ) const [virtual]
virtual bool mitk::NavigationData::GetHasOrientation (  ) const [virtual]
virtual bool mitk::NavigationData::GetHasPosition (  ) const [virtual]

sets the HasPosition flag of the NavigationData object

Referenced by Graft(), and mitk::NavigationDataRecorder::Update().

virtual const char* mitk::NavigationData::GetName (  ) const [virtual]
virtual OrientationType mitk::NavigationData::GetOrientation (  ) const [virtual]
virtual PositionType mitk::NavigationData::GetPosition (  ) const [virtual]
virtual TimeStampType mitk::NavigationData::GetTimeStamp (  ) const [virtual]

sets the timestamp of the NavigationData object

Referenced by mitk::NavigationDataToMessageFilter::GenerateData(), and Graft().

void mitk::NavigationData::Graft ( const DataObject *  data ) [virtual]

returns the name of the NavigationData object

Graft the data and information from one NavigationData to another.

Copies the content of data into this object. This is a convenience method to setup a second NavigationData object with all the meta information of another NavigationData object. Note that this method is different than just using two SmartPointers to the same NavigationData object since separate DataObjects are still maintained.

Definition at line 35 of file mitkNavigationData.cpp.

References GetCovErrorMatrix(), GetHasOrientation(), GetHasPosition(), GetName(), GetOrientation(), GetPosition(), GetTimeStamp(), and IsDataValid().

Referenced by mitk::NavigationDataTransformFilter::GenerateData(), mitk::NavigationDataToOpenGLFilter::GenerateData(), mitk::NavigationDataToMessageFilter::GenerateData(), mitk::NavigationDataSequentialPlayer::GenerateData(), mitk::NavigationDataPlayer::GenerateData(), mitk::NavigationDataObjectVisualizationFilter::GenerateData(), mitk::NavigationDataLandmarkTransformFilter::GenerateData(), mitk::NavigationDataDisplacementFilter::GenerateData(), and mitk::CameraVisualization::GenerateData().

{
  // Attempt to cast data to an NavigationData
  const Self* nd;
  try
  {
    nd = dynamic_cast<const Self *>( data );
  }
  catch( ... )
  {
    itkExceptionMacro( << "mitk::NavigationData::Graft cannot cast "
      << typeid(data).name() << " to "
      << typeid(const Self *).name() );
    return;
  }
  if (!nd)
  {
    // pointer could not be cast back down
    itkExceptionMacro( << "mitk::NavigationData::Graft cannot cast "
      << typeid(data).name() << " to "
      << typeid(const Self *).name() );
    return;
  }
  // Now copy anything that is needed
  this->SetPosition(nd->GetPosition());
  this->SetOrientation(nd->GetOrientation());
  this->SetDataValid(nd->IsDataValid());
  this->SetTimeStamp(nd->GetTimeStamp());
  this->SetHasPosition(nd->GetHasPosition());
  this->SetHasOrientation(nd->GetHasOrientation());
  this->SetCovErrorMatrix(nd->GetCovErrorMatrix());
  this->SetName(nd->GetName());
}
bool mitk::NavigationData::IsDataValid (  ) const [virtual]
static Pointer mitk::NavigationData::New (  ) [static]
void mitk::NavigationData::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const

print object information

Definition at line 76 of file mitkNavigationData.cpp.

{
  this->Superclass::PrintSelf(os, indent);
  os << indent << "data valid: "     << this->IsDataValid() << std::endl;
  os << indent << "Position: "       << this->GetPosition() << std::endl;
  os << indent << "TimeStamp: "      << this->GetTimeStamp() << std::endl;
  os << indent << "HasPosition: "    << this->GetHasPosition() << std::endl;
  os << indent << "HasOrientation: " << this->GetHasOrientation() << std::endl;
  os << indent << "CovErrorMatrix: " << this->GetCovErrorMatrix() << std::endl;
}
virtual void mitk::NavigationData::SetCovErrorMatrix ( CovarianceMatrixType  _arg ) [virtual]

gets the HasOrientation flag of the NavigationData object

virtual void mitk::NavigationData::SetDataValid ( bool  _arg ) [virtual]
virtual void mitk::NavigationData::SetHasOrientation ( bool  _arg ) [virtual]

gets the HasPosition flag of the NavigationData object

virtual void mitk::NavigationData::SetHasPosition ( bool  _arg ) [virtual]

gets the timestamp of the NavigationData object

virtual void mitk::NavigationData::SetName ( const char *  _arg ) [virtual]

gets the 6x6 Error Covariance Matrix of the NavigationData object

virtual void mitk::NavigationData::SetOrientation ( OrientationType  _arg ) [virtual]
void mitk::NavigationData::SetOrientationAccuracy ( mitk::ScalarType  error )

Set the orientation part of m_CovErrorMatrix to I*error^2 This means that all orientation variables are assumed to be independent

Definition at line 129 of file mitkNavigationData.cpp.

Referenced by mitk::TrackingDeviceSource::GenerateData().

{
  for ( int i = 0; i < 3; i++ )
    for ( int j = 0; j < 3; j++ ) {
      m_CovErrorMatrix[ i + 3 ][ j + 3 ] = 0;
      // assume independence of position and orientation
      m_CovErrorMatrix[ i + 3 ][ j ] = 0;
      m_CovErrorMatrix[ i ][ j + 3 ] = 0;
    }
  m_CovErrorMatrix[3][3] = m_CovErrorMatrix[4][4] = m_CovErrorMatrix[5][5] = error * error;
}
virtual void mitk::NavigationData::SetPosition ( PositionType  _arg ) [virtual]
void mitk::NavigationData::SetPositionAccuracy ( mitk::ScalarType  error )

Set the position part of m_CovErrorMatrix to I*error^2 This means that all position variables are assumed to be independent

Definition at line 115 of file mitkNavigationData.cpp.

Referenced by mitk::TrackingDeviceSource::GenerateData().

{
  for ( int i = 0; i < 3; i++ )
    for ( int j = 0; j < 3; j++ ) 
    {
      m_CovErrorMatrix[ i ][ j ] = 0;
      // assume independence of position and orientation
      m_CovErrorMatrix[ i + 3 ][ j ] = 0;
      m_CovErrorMatrix[ i ][ j + 3 ] = 0;
    }
  m_CovErrorMatrix[0][0] = m_CovErrorMatrix[1][1] = m_CovErrorMatrix[2][2] = error * error;
}
virtual void mitk::NavigationData::SetTimeStamp ( TimeStampType  _arg ) [virtual]

sets the overall error estimation of the NavigationData object

Referenced by mitk::TrackingDeviceSource::GenerateData().


Member Data Documentation

A 6x6 covariance matrix parameterizing the Gaussian error distribution of the measured position and orientation.

The hasPosition/hasOrientation fields define which entries are valid. holds the error characterization of the position and orientation

Definition at line 114 of file mitkNavigationData.h.

Referenced by NavigationData().

defines if the object contains valid values

Definition at line 117 of file mitkNavigationData.h.

defines if orientation part of m_CovErrorMatrix is valid

Definition at line 116 of file mitkNavigationData.h.

defines if position part of m_CovErrorMatrix is valid

Definition at line 115 of file mitkNavigationData.h.

std::string mitk::NavigationData::m_Name [protected]

name of the navigation data

Definition at line 119 of file mitkNavigationData.h.

holds the orientation part of the tracking data

Definition at line 105 of file mitkNavigationData.h.

holds the position part of the tracking data

Definition at line 104 of file mitkNavigationData.h.

Referenced by NavigationData().

contains the time at which the tracking data was recorded

Definition at line 118 of file mitkNavigationData.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines