class
UltrasoundImageCropperAutomatic cropping of an ultrasound scanner image.
Contents
- Reference
When streaming or storing images/video on ultrasound scanner, the menu and a lot of information around the actual ultrasound image is often included. This algorithm tries to extract the ultrasound image from the entire scanner GUI image using two thresholds. It does this by counting the number of non-zero pixels in every row and column of the image. Works best on linear array images.
Inputs:
- 0: Image
Outputs:
- 0: Image
Base classes
- class ProcessObject
- Abstract base class for all process objects.
Public functions
- auto create(float physicalWidth, bool staticCropping, float thresholdVertical, float thresholdHorizontal) -> std::shared_ptr<UltrasoundImageCropper>
- void setStaticCropping(bool staticCropping)
- void setThresholds(float threshold1, float threshold2)
- void loadAttributes() override
Private functions
- void execute() virtual
Function documentation
std::shared_ptr<UltrasoundImageCropper> fast:: UltrasoundImageCropper:: create(float physicalWidth,
bool staticCropping,
float thresholdVertical,
float thresholdHorizontal)
Parameters | |
---|---|
physicalWidth | The physical width of the scanning region. This is used to set the pixel spacing correctly. |
staticCropping | Estimate the cropping parameters (offset, size) on the first frame only, then use these for all subsequent frames |
thresholdVertical | |
thresholdHorizontal | |
Returns | By setting the physical width of the image, the physical height can also be calculated and the spacing of the image set correctly. |
void fast:: UltrasoundImageCropper:: setStaticCropping(bool staticCropping)
Parameters | |
---|---|
staticCropping |
If static cropping is enabled, the cropping parameters are calculated only for the first frame. Otherwise, it is recalculated for every frame.