Medical Imaging Interaction Toolkit  2018.4.99-b7f3afaa
Medical Imaging Interaction Toolkit
mitk::USImageSource Class Referenceabstract

This is an abstract superclass for delivering USImages. Each subclass must implement the method mitk::USImageSource::GetNextRawImage(). The public method mitk::USImageSource::GetNextImage() can the be used to get the next image from the image source. This image will be filtered by the filter set with mitk::USImageSource::SetImageFilter(). More...

#include <mitkUSImageSource.h>

Inheritance diagram for mitk::USImageSource:
Collaboration diagram for mitk::USImageSource:

Public Member Functions

 mitkClassMacroItkParent (USImageSource, itk::Object)
 
virtual mitk::BasicCombinationOpenCVImageFilter::Pointer GetImageFilter ()
 
void PushFilter (AbstractOpenCVImageFilter::Pointer filter)
 
bool RemoveFilter (AbstractOpenCVImageFilter::Pointer filter)
 
bool GetIsFilterInThePipeline (AbstractOpenCVImageFilter::Pointer filter)
 
std::vector< mitk::Image::PointerGetNextImage ()
 Retrieves the next frame. This will typically be the next frame in a file or the last cached file in a device. The image is filtered if a filter was set by mitk::USImageSource::SetImageFilter(). More...
 

Static Public Attributes

static const char * IMAGE_PROPERTY_IDENTIFIER
 

Protected Member Functions

 USImageSource ()
 
 ~USImageSource () override
 
virtual void GetNextRawImage (std::vector< cv::Mat > &)
 Set the given OpenCV image matrix to the next image received from the device or file. More...
 
virtual void GetNextRawImage (std::vector< mitk::Image::Pointer > &)=0
 Set mitk::Image to the next image received from the device or file. This method must be implemented in every subclass. More...
 

Protected Attributes

mitk::OpenCVToMitkImageFilter::Pointer m_OpenCVToMitkFilter
 Used to convert from OpenCV Images to MITK Images. More...
 
mitk::ImageToOpenCVImageFilter::Pointer m_MitkToOpenCVFilter
 Used to convert from MITK Images to OpenCV Images. More...
 

Detailed Description

This is an abstract superclass for delivering USImages. Each subclass must implement the method mitk::USImageSource::GetNextRawImage(). The public method mitk::USImageSource::GetNextImage() can the be used to get the next image from the image source. This image will be filtered by the filter set with mitk::USImageSource::SetImageFilter().

Definition at line 37 of file mitkUSImageSource.h.

Constructor & Destructor Documentation

◆ USImageSource()

mitk::USImageSource::USImageSource ( )
protected

Definition at line 18 of file mitkUSImageSource.cpp.

◆ ~USImageSource()

mitk::USImageSource::~USImageSource ( )
overrideprotected

Definition at line 27 of file mitkUSImageSource.cpp.

Member Function Documentation

◆ GetImageFilter()

virtual mitk::BasicCombinationOpenCVImageFilter::Pointer mitk::USImageSource::GetImageFilter ( )
virtual

◆ GetIsFilterInThePipeline()

bool mitk::USImageSource::GetIsFilterInThePipeline ( AbstractOpenCVImageFilter::Pointer  filter)

Definition at line 41 of file mitkUSImageSource.cpp.

◆ GetNextImage()

std::vector< mitk::Image::Pointer > mitk::USImageSource::GetNextImage ( )

Retrieves the next frame. This will typically be the next frame in a file or the last cached file in a device. The image is filtered if a filter was set by mitk::USImageSource::SetImageFilter().

Returns
pointer to the next USImage (filtered if set)

Definition at line 46 of file mitkUSImageSource.cpp.

References GetNextRawImage(), IMAGE_PROPERTY_IDENTIFIER, m_OpenCVToMitkFilter, mitk::IntProperty::New(), and mitk::Image::New().

◆ GetNextRawImage() [1/2]

void mitk::USImageSource::GetNextRawImage ( std::vector< cv::Mat > &  imageVector)
protectedvirtual

Set the given OpenCV image matrix to the next image received from the device or file.

The standard implementation calls the overloaded function with an mitk::Image and converts this image to OpenCV then. One should reimplement this method for a better performance if an image filter is set.

Reimplemented in mitk::USImageVideoSource.

Definition at line 97 of file mitkUSImageSource.cpp.

References m_MitkToOpenCVFilter, and mitk::ImageToOpenCVImageFilter::New().

Referenced by GetNextImage().

◆ GetNextRawImage() [2/2]

virtual void mitk::USImageSource::GetNextRawImage ( std::vector< mitk::Image::Pointer > &  )
protectedpure virtual

Set mitk::Image to the next image received from the device or file. This method must be implemented in every subclass.

Implemented in mitk::USImageVideoSource, mitk::USDiPhASImageSource, mitk::IGTLMessageToUSImageFilter, and mitk::USTelemedImageSource.

◆ mitkClassMacroItkParent()

mitk::USImageSource::mitkClassMacroItkParent ( USImageSource  ,
itk::Object   
)

◆ PushFilter()

void mitk::USImageSource::PushFilter ( AbstractOpenCVImageFilter::Pointer  filter)

◆ RemoveFilter()

bool mitk::USImageSource::RemoveFilter ( AbstractOpenCVImageFilter::Pointer  filter)

Member Data Documentation

◆ IMAGE_PROPERTY_IDENTIFIER

const char * mitk::USImageSource::IMAGE_PROPERTY_IDENTIFIER
static

Definition at line 40 of file mitkUSImageSource.h.

Referenced by GetNextImage().

◆ m_MitkToOpenCVFilter

mitk::ImageToOpenCVImageFilter::Pointer mitk::USImageSource::m_MitkToOpenCVFilter
protected

Used to convert from MITK Images to OpenCV Images.

Definition at line 85 of file mitkUSImageSource.h.

Referenced by GetNextRawImage().

◆ m_OpenCVToMitkFilter

mitk::OpenCVToMitkImageFilter::Pointer mitk::USImageSource::m_OpenCVToMitkFilter
protected

Used to convert from OpenCV Images to MITK Images.

Definition at line 81 of file mitkUSImageSource.h.

Referenced by GetNextImage(), and mitk::USImageVideoSource::GetNextRawImage().


The documentation for this class was generated from the following files: