38 <<
" T:" << newArea.
top <<
" B:" << newArea.
bottom;
43 if ((newArea.
bottom == 0) && (newArea.
top == 0) &&
44 (newArea.
left == 0) && (newArea.
right == 0))
55 MITK_WARN <<
"Cannot set crop are, source is not initialized!";
63 if(
m_Device->GetCurrentProbe().IsNotNull() )
65 m_Device->GetCurrentProbe()->SetCurrentDepth(depth);
66 MITK_INFO <<
"SetCurrentDepth of currentProbe: " << depth;
76 m_Device->SetCurrentProbe(probename);
85 if (device.IsNotNull())
87 mitk::USProbe::Pointer probe = device->GetCurrentProbe();
88 if (probe.IsNotNull())
90 return probe->GetProbeCropping();
94 return defaultCropping;
100 if (device.IsNotNull())
102 mitk::USProbe::Pointer probe = device->GetCurrentProbe();
103 if( probe.IsNotNull() )
105 probe->SetProbeCropping(cropping.
top, cropping.
bottom, cropping.
left, cropping.
right);
117 mitk::USProbe::Pointer probe =
m_Device->GetProbeByName(name);
118 std::map<int, mitk::Vector3D> depthsAndSpacings = probe->GetDepthsAndSpacing();
119 std::vector<int> depths;
120 for (std::map<int, mitk::Vector3D>::iterator it = depthsAndSpacings.begin(); it != depthsAndSpacings.end(); it++)
122 depths.push_back((it->first));
129 m_Device->SetDefaultProbeAsCurrentProbe();
Superclass for all ultrasound device control interfaces. Defines an interface for activating and deac...
itk::WeakPointer< USDevice > m_Device
bool GetIsActive() override
void SetCropArea(USImageVideoSource::USImageCropping newArea)
Sets the area that will be cropped from the US image. Set [0,0,0,0] to disable it, which is also default.
Defines a region of interest by distances to the four image borders.
void SetNewDepth(double depth)
Sets a new depth value to the current probe.
DataCollection - Class to facilitate loading/accessing structured data.
std::vector< mitk::USProbe::Pointer > GetProbes()
Get all the probes for the current device.
std::vector< int > GetDepthsForProbe(std::string name)
Get the scanning dephts of the given probe.
This class can be pointed to a video file or a videodevice and delivers USImages. ...
void SetDefaultProbeAsCurrentProbe()
Sets the first existing probe or the default probe of a USVideoDevice as the current probe of the USV...
void SetIsActive(bool isActive) override
void SetNewProbeIdentifier(std::string probename)
mitk::USProbe::USProbeCropping GetCropArea()
USImageVideoSource::Pointer m_ImageSource
USVideoDeviceCustomControls(itk::SmartPointer< USDevice > device)
void UpdateProbeCropping(mitk::USImageVideoSource::USImageCropping cropping)
Updates the cropping of the current probe given by the crop area of the USImageVideoSource.
A mitk::USVideoDevice is the common class for video only devices. They capture video input either fro...
Struct to define a probe specific ultrasound image cropping.
~USVideoDeviceCustomControls() override