An instance of this class represents the tracking volume of a tracking device. More...
#include <mitkTrackingVolume.h>
Public Types | |
typedef TrackingVolume | Self |
typedef mitk::Surface | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
bool | SetTrackingDeviceType (TrackingDeviceType type) |
Sets the tracking device of the volume. After doing this the volume is set to the correct dimensions in the correct coordinate system. | |
void | SetVolumeManually (vtkPolyData *volume) |
Sets the trackingvolume explicitly. Only use this method if your specific trackingvolume is not supported by this class. The type is set to TrackingSystemNotSpecified if doing this. | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
TrackingVolume () | |
Protected Attributes | |
TrackingDeviceType | m_TrackingDeviceType |
The current type of the corresponding tracking device is hold here. If the type is unknown the value is set to TrackingSystemNotSpecified. |
An instance of this class represents the tracking volume of a tracking device.
Documentation As it inherits from mitk::Surface it can be displayed in the 3D-window of MITK. The coordinate system is the same as the coordination system of the tracking device. To have the specific dimensions of the tracking volume of a tracking device the method SetTrackingDeviceType() needs to be called. For tracking devices that have a modifiable tracking volume (e.g. VirtualTrackingDevice, this class produces a tracking volume with default values (e.g. that are set in the class' constructor
Definition at line 45 of file mitkTrackingVolume.h.
typedef itk::SmartPointer<const Self> mitk::TrackingVolume::ConstPointer |
Reimplemented from mitk::Surface.
Definition at line 48 of file mitkTrackingVolume.h.
typedef itk::SmartPointer<Self> mitk::TrackingVolume::Pointer |
Reimplemented from mitk::Surface.
Definition at line 48 of file mitkTrackingVolume.h.
Reimplemented from mitk::Surface.
Definition at line 48 of file mitkTrackingVolume.h.
Reimplemented from mitk::Surface.
Definition at line 48 of file mitkTrackingVolume.h.
mitk::TrackingVolume::TrackingVolume | ( | ) | [protected] |
Definition at line 25 of file mitkTrackingVolume.cpp.
References mitk::StandardFileLocations::AddDirectoryForSearch(), mitk::StandardFileLocations::GetInstance(), m_TrackingDeviceType, MITK_ROOT, and mitk::TrackingSystemNotSpecified.
{ m_TrackingDeviceType = mitk::TrackingSystemNotSpecified; //####### initialize file locations for the volume-STL-files ######### std::string m_VolumeDir = MITK_ROOT; m_VolumeDir += "Modules/IGT/IGTTrackingDevices/TrackingVolumeData"; mitk::StandardFileLocations::GetInstance()->AddDirectoryForSearch( m_VolumeDir.c_str(), false ); //#################################################################### }
virtual const char* mitk::TrackingVolume::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::Surface.
static Pointer mitk::TrackingVolume::New | ( | ) | [static] |
Reimplemented from mitk::Surface.
Referenced by QmitkIGTRecorderView::OnStartRecording(), mitkTrackingVolumeTestClass::TestClaronTrackingVolume(), mitkTrackingVolumeTestClass::TestInstantiation(), mitkTrackingVolumeTestClass::TestIntuitiveDaVinciTrackingVolume(), mitkTrackingVolumeTestClass::TestManualVolume(), mitkTrackingVolumeTestClass::TestNDIAuroraTrackingVolume(), and mitkTrackingVolumeTestClass::TestNDIPolarisTrackingVolume().
bool mitk::TrackingVolume::SetTrackingDeviceType | ( | TrackingDeviceType | type ) |
Sets the tracking device of the volume. After doing this the volume is set to the correct dimensions in the correct coordinate system.
type | The type of the tracking device (something like NDIAurora or NDIPolaris). |
Definition at line 50 of file mitkTrackingVolume.cpp.
References mitk::ClaronMicron, mitk::StandardFileLocations::FindFile(), mitk::StandardFileLocations::GetInstance(), mitk::IntuitiveDaVinci, mitk::NDIAurora, mitk::NDIPolaris, mitk::STLFileReader::New(), and mitk::VirtualTracker.
{ // get filename / perform custom initiation std::string filename = ""; switch(type) { case mitk::ClaronMicron: filename = mitk::StandardFileLocations::GetInstance()->FindFile("ClaronMicron.stl"); break; case mitk::IntuitiveDaVinci: filename = mitk::StandardFileLocations::GetInstance()->FindFile("IntuitiveDaVinci.stl"); break; case mitk::NDIAurora: filename = mitk::StandardFileLocations::GetInstance()->FindFile("NDIAurora.stl"); break; case mitk::NDIPolaris: filename = mitk::StandardFileLocations::GetInstance()->FindFile("NDIPolaris.stl"); break; case mitk::VirtualTracker: { vtkCubeSource* cs = vtkCubeSource::New(); double bounds[6]; bounds[0] = bounds[2] = bounds[4] = -400.0; // initialize bounds to -400 ... +400 cube. This is the default value of the bounds[1] = bounds[3] = bounds[5] = 400.0; // virtual tracking device, but it can be changed. In that case, // the tracking volume polydata has be updated manually cs->SetBounds(bounds); cs->GetOutput()->Update(); this->SetVtkPolyData(cs->GetOutput()); cs->Delete(); return true; } default: return false; } if (filename.empty()) return false; mitk::STLFileReader::Pointer stlReader = mitk::STLFileReader::New(); try { stlReader->SetFileName( filename.c_str() ); stlReader->Update(); } catch (...) { return false; } if ( stlReader->GetOutput() == NULL ) return false; this->SetVtkPolyData( stlReader->GetOutput()->GetVtkPolyData()); stlReader = NULL; return true; }
void mitk::TrackingVolume::SetVolumeManually | ( | vtkPolyData * | volume ) |
Sets the trackingvolume explicitly. Only use this method if your specific trackingvolume is not supported by this class. The type is set to TrackingSystemNotSpecified if doing this.
volume | The new tracking volume as vtkPolyData. |
Definition at line 45 of file mitkTrackingVolume.cpp.
{ this->SetVtkPolyData(volume); }
The current type of the corresponding tracking device is hold here. If the type is unknown the value is set to TrackingSystemNotSpecified.
Definition at line 84 of file mitkTrackingVolume.h.
Referenced by TrackingVolume().