20 #include <vtkCubeSource.h>
24 #include <vtkSmartPointer.h>
51 MITK_ERROR <<
"No tracking device service found!";
62 std::string filepath =
"";
63 std::string
filename = this->m_Data.VolumeModelLocation;
68 if (filename.compare(
"cube") == 0){
71 bounds[0] = bounds[2] = bounds[4] = -400.0;
72 bounds[1] = bounds[3] = bounds[5] = 400.0;
74 cubeSource->SetBounds(bounds);
77 output->SetVtkPolyData(cubeSource->GetOutput());
80 if (filename.compare(
"") == 0)
84 output->SetVtkPolyData(emptyPolyData);
85 emptyPolyData->Delete();
102 output->SetVtkPolyData(fileoutput->GetVtkPolyData());
111 MITK_ERROR <<
"No tracking device service found!";
mitk::TrackingDeviceType GetTrackingDeviceType() const
Class for storing surfaces (vtkPolyData).
itk::SmartPointer< Self > Pointer
void SetTrackingDevice(mitk::TrackingDevice::Pointer tracker)
Deprecated! Use set DeviceData instead. Sets the tracking device type of the volume. After doing this the tracking volume gets generated and is set to the correct dimensions in the correct coordinate system. The TV of a VirtualTrackingDevice is always a 400*400 cube.
This class is a collection for information of all Tracking Device Types (derived from abstract Tracki...
void SetTrackingDeviceType(mitk::TrackingDeviceType deviceType)
Deprecated! Use set DeviceData instead. Sets the tracking device type of the volume. Warning: there are different possible volumes for some device types. In this case a default volume is chosen automatically. All tracking volumes are defined by TrackingDeviceData objects (see file mitkTrackingTypes.h) for a list.
void * GetService(const ServiceReferenceBase &reference)
void SetTrackingDeviceData(mitk::TrackingDeviceData deviceData)
Sets the tracking device data object which will be used to generate the volume. Each tracking device ...
TrackingDeviceData GetFirstCompatibleDeviceDataForLine(TrackingDeviceType type)
Module * GetModule() const
static const std::string filename
mitk::TrackingDeviceData GetTrackingDeviceData() const
std::vector< ServiceReferenceU > GetServiceReferences(const std::string &clazz, const std::string &filter=std::string())
std::string TrackingDeviceType
static DataStorage::SetOfObjects::Pointer Load(const std::string &path, DataStorage &storage)
Load a file into the given DataStorage.
void GenerateData() override
ModuleResource GetResource(const std::string &path) const
mitk::TrackingDeviceData m_Data
Holds the current tracking device data object, which is used to generate the volume.
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
TrackingVolumeGenerator()
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.