Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
A pseudo-Filter for creating OpenCV images from MITK images with the option of copying data or referencing it. More...
#include <mitkImageToOpenCVImageFilter.h>
Public Types | |
typedef itk::RGBPixel< unsigned char > | UCRGBPixelType |
typedef itk::RGBPixel< unsigned short > | USRGBPixelType |
typedef itk::RGBPixel< float > | FloatRGBPixelType |
typedef itk::RGBPixel< double > | DoubleRGBPixelType |
Public Member Functions | |
mitkClassMacroItkParent (ImageToOpenCVImageFilter, itk::Object) | |
Pointer | Clone () const |
void | SetImage (mitk::Image *_Image) |
set the input MITK image More... | |
virtual mitk::Image * | GetImage () |
get the input MITK image More... | |
bool | CheckImage (mitk::Image *image) |
get the input MITK image More... | |
IplImage * | GetOpenCVImage () |
cv::Mat | GetOpenCVMat () |
void | SetInputFromTimeSlice (Image::Pointer mitkImage, int timeStep, int slice) |
Convenient method to set a certain slice of a 3D or 4D mitk::Image as input to convert it to an openCV image. More... | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
template<typename TPixel , unsigned int VImageDimension> | |
void | ItkImageProcessing (itk::Image< TPixel, VImageDimension > *image) |
ImageToOpenCVImageFilter () | |
~ImageToOpenCVImageFilter () | |
Protected Attributes | |
mitk::WeakPointer< mitk::Image > | m_Image |
IplImage * | m_OpenCVImage |
A pseudo-Filter for creating OpenCV images from MITK images with the option of copying data or referencing it.
Definition at line 34 of file mitkImageToOpenCVImageFilter.h.
typedef itk::RGBPixel< double > mitk::ImageToOpenCVImageFilter::DoubleRGBPixelType |
Definition at line 40 of file mitkImageToOpenCVImageFilter.h.
typedef itk::RGBPixel< float > mitk::ImageToOpenCVImageFilter::FloatRGBPixelType |
Definition at line 39 of file mitkImageToOpenCVImageFilter.h.
typedef itk::RGBPixel< unsigned char > mitk::ImageToOpenCVImageFilter::UCRGBPixelType |
Definition at line 37 of file mitkImageToOpenCVImageFilter.h.
typedef itk::RGBPixel< unsigned short > mitk::ImageToOpenCVImageFilter::USRGBPixelType |
Definition at line 38 of file mitkImageToOpenCVImageFilter.h.
|
protected |
Definition at line 25 of file mitkImageToOpenCVImageFilter.cpp.
References mitk::ImageSliceSelector::New().
|
protected |
Definition at line 31 of file mitkImageToOpenCVImageFilter.cpp.
References m_OpenCVImage.
bool mitk::ImageToOpenCVImageFilter::CheckImage | ( | mitk::Image * | image | ) |
get the input MITK image
Definition at line 43 of file mitkImageToOpenCVImageFilter.cpp.
References mitk::Image::GetDimension(), and MITK_WARN.
Referenced by GetOpenCVImage().
Pointer mitk::ImageToOpenCVImageFilter::Clone | ( | ) | const |
|
virtual |
get the input MITK image
IplImage * mitk::ImageToOpenCVImageFilter::GetOpenCVImage | ( | ) |
RUNS the conversion and returns the produced OpenCVImage. !!!ATTENTION!!! Do not forget to release this image again with cvReleaseImage().
Definition at line 58 of file mitkImageToOpenCVImageFilter.cpp.
References AccessFixedTypeByItk, CheckImage(), ItkImageProcessing(), m_Image, m_OpenCVImage, and MITK_ACCESSBYITK_PIXEL_TYPES_SEQ.
Referenced by GetOpenCVMat().
cv::Mat mitk::ImageToOpenCVImageFilter::GetOpenCVMat | ( | ) |
RUNS the conversion and returns the produced image as cv::Mat.
Definition at line 81 of file mitkImageToOpenCVImageFilter.cpp.
References GetOpenCVImage().
|
protected |
the actual templated conversion method
Definition at line 97 of file mitkImageToOpenCVImageFilter.cpp.
References m_OpenCVImage.
Referenced by GetOpenCVImage().
mitk::ImageToOpenCVImageFilter::mitkClassMacroItkParent | ( | ImageToOpenCVImageFilter | , |
itk::Object | |||
) |
|
static |
void mitk::ImageToOpenCVImageFilter::SetImage | ( | mitk::Image * | _Image | ) |
set the input MITK image
Definition at line 37 of file mitkImageToOpenCVImageFilter.cpp.
References m_Image.
Referenced by SetInputFromTimeSlice().
void mitk::ImageToOpenCVImageFilter::SetInputFromTimeSlice | ( | Image::Pointer | mitkImage, |
int | timeStep, | ||
int | slice | ||
) |
Convenient method to set a certain slice of a 3D or 4D mitk::Image as input to convert it to an openCV image.
This methods sets the input. Call GetOpenCVMat() or GetOpenCVImage() to get the image.
mitkImage | - the image that should be converted to an openCVImage |
timeStep | - the time step, which is converted to openCV |
slice | - the slice which is converted to openCV |
Definition at line 102 of file mitkImageToOpenCVImageFilter.cpp.
References SetImage().
|
protected |
Saves if the filter should copy the data or just reference it
Definition at line 96 of file mitkImageToOpenCVImageFilter.h.
Referenced by GetOpenCVImage(), and SetImage().
|
protected |
Definition at line 97 of file mitkImageToOpenCVImageFilter.h.
Referenced by GetOpenCVImage(), ItkImageProcessing(), and ~ImageToOpenCVImageFilter().