25 NavigationDataSource::Pointer trackingDevice,
26 bool trackedUltrasoundActive)
48 if (image.IsNull() || !image->IsInitialized())
50 MITK_WARN <<
"Invalid image in USCombinedModality, aborting!";
56 if (!output->IsInitialized())
58 output->Initialize(image);
63 output->SetSlice(inputReadAccessor.GetData());
67 if (!calibrationKey.empty())
69 std::map<std::string, mitk::AffineTransform3D::Pointer>::iterator calibrationIterator =
78 output->GetGeometry()->SetSpacing(image->GetGeometry()->GetSpacing());
84 if (trackingDeviceSource.IsNull())
86 MITK_WARN(
"USCombinedModality")(
"USDevice") <<
"Cannot freeze tracking.";
90 if (freeze) { trackingDeviceSource->Freeze(); }
91 else { trackingDeviceSource->UnFreeze(); }
96 MITK_ERROR(
"USCombinedModality")(
"USDevice") <<
"UltrasoundDevice must not be null.";
97 mitkThrow() <<
"UltrasoundDevice must not be null.";
void SetIndexToWorldTransform(mitk::AffineTransform3D *transform)
void GenerateData() override
Grabs the next frame from the input. This method is called internally, whenever Update() is invoked b...
~USCombinedModality() override
USCombinedModality(USDevice::Pointer usDevice, itk::SmartPointer< NavigationDataSource > trackingDevice, bool trackedUltrasoundActive=false)
AffineTransform3D::Pointer GetUSPlaneTransform() override
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
AffineTransform3D::Pointer GetCalibration()
Getter for calibration data of the currently active depth and probe.
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.
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
void OnFreeze(bool) override
Freezes or unfreezes the CombinedModality.