24 NavigationDataSource::Pointer trackingDevice,
25 bool trackedUltrasoundActive )
50 if (image.IsNull() || !image->IsInitialized())
52 MITK_WARN <<
"Invalid image in TrackedUltrasound, aborting!";
59 if (!output->IsInitialized()) { output->Initialize(image); }
63 output->SetSlice(inputReadAccessor.GetData());
64 output->GetGeometry()->SetSpacing(image->GetGeometry()->GetSpacing());
68 if (!calibrationKey.empty())
70 std::map<std::string, mitk::AffineTransform3D::Pointer>::iterator calibrationIterator
85 if (trackingDeviceSource.IsNull())
87 MITK_WARN(
"TrackedUltrasound")(
"USDevice") <<
"Cannot freeze tracking.";
91 if (freeze) { trackingDeviceSource->Freeze(); }
92 else { trackingDeviceSource->UnFreeze(); }
97 MITK_ERROR(
"TrackedUltrasound")(
"USDevice") <<
"UltrasoundDevice must not be null.";
98 mitkThrow() <<
"UltrasoundDevice must not be null.";
void OnFreeze(bool) override
Freezes or unfreezes the TrackedUltrasound device.
~TrackedUltrasound() override
itk::SmartPointer< mitk::NavigationDataDisplacementFilter > m_DisplacementFilter
void GenerateData() override
Grabs the next frame from the input. This method is called internally, whenever Update() is invoked b...
TrackedUltrasound(USDevice::Pointer usDevice, itk::SmartPointer< NavigationDataSource > trackingDevice, bool trackedUltrasoundActive=true)
std::map< std::string, AffineTransform3D::Pointer > m_Calibrations
virtual bool GetIsFreezed()
Abstract class for an easy handling of a combination of an USDevice and a NavigationDataSource. This class can be used as an ImageSource subclass. Additionally tracking data be retrieved from the NavigationDataSource returned by GetTrackingDevice().
mitk::Image::Pointer image
USDevice::Pointer m_UltrasoundDevice
Connects a mitk::TrackingDevice to a MITK-IGT NavigationData-Filterpipeline.
std::string GetIdentifierForCurrentCalibration()
OutputType * GetOutput()
Get the output data of this image source object.
itk::SmartPointer< NavigationDataSource > m_TrackingDeviceDataSource
ImageReadAccessor class to get locked read access for a particular image part.
AffineTransform3D::Pointer GetUSPlaneTransform() override