Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitk::PhotoacousticFilterService Class Reference

Class holding methods to apply all Filters within the Photoacoustics Algorithms Module. More...

#include <mitkPhotoacousticFilterService.h>

Inheritance diagram for mitk::PhotoacousticFilterService:
Collaboration diagram for mitk::PhotoacousticFilterService:

Public Types

enum  BModeMethod { EnvelopeDetection, Abs }
 Defines the methods for the B-Mode filter Currently implemented are an Envelope Detection filter and a simple Absolute filter. More...
 

Public Member Functions

 mitkClassMacroItkParent (mitk::PhotoacousticFilterService, itk::Object)
 
mitk::Image::Pointer ApplyBmodeFilter (mitk::Image::Pointer inputImage, BModeMethod method=BModeMethod::Abs, bool UseLogFilter=false)
 Applies a B-Mode Filter. More...
 
mitk::Image::Pointer ApplyResampling (mitk::Image::Pointer inputImage, double *outputSpacing)
 Resamples the given image. More...
 
mitk::Image::Pointer ApplyResamplingToDim (mitk::Image::Pointer inputImage, double *outputDimension)
 
mitk::Image::Pointer ApplyBeamforming (mitk::Image::Pointer inputImage, BeamformingSettings::Pointer config, std::function< void(int, std::string)> progressHandle=[](int, std::string) {})
 Beamforms the given image. More...
 
mitk::Image::Pointer ApplyCropping (mitk::Image::Pointer inputImage, int above, int below, int right, int left, int minSlice, int maxSlice, int *errCode)
 Crops the given image. More...
 
mitk::Image::Pointer ExtendImage (mitk::Image::Pointer inputImage, float pixelColor, unsigned int outputDimensionY)
 
mitk::Image::Pointer ApplyBandpassFilter (mitk::Image::Pointer data, float BPHighPass, float BPLowPass, float alphaHighPass, float alphaLowPass, float timeSpacing, float SpeedOfSound, bool IsBFImage)
 Applies a Bandpass filter to the given image. More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 PhotoacousticFilterService ()
 
 ~PhotoacousticFilterService () override
 
mitk::Image::Pointer ConvertToFloat (mitk::Image::Pointer)
 

Protected Attributes

mitk::BeamformingFilter::Pointer m_BeamformingFilter
 For performance reasons, an instance of the Beamforming filter is initialized as soon as possible and kept for all further uses. More...
 

Detailed Description

Class holding methods to apply all Filters within the Photoacoustics Algorithms Module.

Implemented are:

  • A B-Mode Filter
  • A Resampling Filter
  • Beamforming on GPU and CPU
  • A Bandpass Filter

Definition at line 36 of file mitkPhotoacousticFilterService.h.

Member Enumeration Documentation

◆ BModeMethod

Defines the methods for the B-Mode filter Currently implemented are an Envelope Detection filter and a simple Absolute filter.

Enumerator
EnvelopeDetection 
Abs 

Definition at line 45 of file mitkPhotoacousticFilterService.h.

Constructor & Destructor Documentation

◆ PhotoacousticFilterService()

mitk::PhotoacousticFilterService::PhotoacousticFilterService ( )
protected

Definition at line 39 of file mitkPhotoacousticFilterService.cpp.

References MITK_INFO.

◆ ~PhotoacousticFilterService()

mitk::PhotoacousticFilterService::~PhotoacousticFilterService ( )
overrideprotected

Definition at line 44 of file mitkPhotoacousticFilterService.cpp.

References MITK_INFO.

Member Function Documentation

◆ ApplyBandpassFilter()

mitk::Image::Pointer mitk::PhotoacousticFilterService::ApplyBandpassFilter ( mitk::Image::Pointer  data,
float  BPHighPass,
float  BPLowPass,
float  alphaHighPass,
float  alphaLowPass,
float  timeSpacing,
float  SpeedOfSound,
bool  IsBFImage 
)

Applies a Bandpass filter to the given image.

Applies a bandpass filter to the given image using the given parameters.

Parameters
dataThe image to be processed.
BPHighPassThe position at which Lower frequencies are completely cut off in Hz.
BPLowPassThe position at which Higher frequencies are completely cut off in Hz.
alphaHighPassThe high pass tukey window parameter to control the shape of the bandpass filter: 0 will make it a Box function, 1 a Hann function. alpha can be set between those two bounds.
alphaLowPassThe low passtukey window parameter to control the shape of the bandpass filter: 0 will make it a Box function, 1 a Hann function. alpha can be set between those two bounds.
Returns
The processed image is returned after the filter has finished.

Definition at line 259 of file mitkPhotoacousticFilterService.cpp.

References ConvertToFloat(), MITK_ERROR, and mitk::BandpassFilter::New().

◆ ApplyBeamforming()

mitk::Image::Pointer mitk::PhotoacousticFilterService::ApplyBeamforming ( mitk::Image::Pointer  inputImage,
BeamformingSettings::Pointer  config,
std::function< void(int, std::string)>  progressHandle = [](int, std::string) {} 
)

Beamforms the given image.

Resamples an image using the given parameters.

Parameters
inputImageThe image to be processed.
configThe configuration set to be used for beamforming.
progressHandleAn std::function<void(int, std::string)>, through which progress of the currently updating filter is reported. The integer argument is a number between 0 an 100 to indicate how far completion has been achieved, the std::string argument indicates what the filter is currently doing.
Returns
The processed image is returned after the filter has finished.

Definition at line 230 of file mitkPhotoacousticFilterService.cpp.

References ConvertToFloat(), m_BeamformingFilter, mitk::ImageToImageFilter::New(), mitk::Convert2Dto3DImageFilter::New(), and mitk::Image::New().

◆ ApplyBmodeFilter()

mitk::Image::Pointer mitk::PhotoacousticFilterService::ApplyBmodeFilter ( mitk::Image::Pointer  inputImage,
BModeMethod  method = BModeMethod::Abs,
bool  UseLogFilter = false 
)

Applies a B-Mode Filter.

Applies a B-Mode filter using the given parameters.

Parameters
inputImageThe image to be processed.
methodThe kind of B-Mode Filter to be used.
UseLogFilterSetting this to true will apply a simple logarithm to the image after the B-Mode Filter has been applied.
resampleSpacingIf this is set to 0, nothing will be done; otherwise, the image is resampled to a spacing of resampleSpacing mm per pixel.
Returns
The processed image is returned after the filter has finished.

Definition at line 49 of file mitkPhotoacousticFilterService.cpp.

References mitk::CastToItkImage(), ConvertToFloat(), mitk::GrabItkImageMemory(), and mitk::PhotoacousticBModeFilter::New().

◆ ApplyCropping()

mitk::Image::Pointer mitk::PhotoacousticFilterService::ApplyCropping ( mitk::Image::Pointer  inputImage,
int  above,
int  below,
int  right,
int  left,
int  minSlice,
int  maxSlice,
int *  errCode 
)

Crops the given image.

Crops an image in 3 dimension using the given parameters.

Parameters
inputImageThe image to be processed.
aboveHow many voxels will be cut from the top of the image.
belowHow many voxels will be cut from the bottom of the image.
rightHow many voxels will be cut from the right side of the image.
leftHow many voxels will be cut from the left side of the image.
minSliceThe first slice to be present in the resulting volume.
maxSliceHow many slices are cut off from the end of the volume.
Returns
The processed image is returned after the filter has finished. For the purposes of this module, the returned image is always of type float.

Definition at line 169 of file mitkPhotoacousticFilterService.cpp.

References ConvertToFloat(), MITK_ERROR, mitk::CropImageFilter::New(), and mitk::Image::New().

◆ ApplyResampling()

mitk::Image::Pointer mitk::PhotoacousticFilterService::ApplyResampling ( mitk::Image::Pointer  inputImage,
double *  outputSpacing 
)

Resamples the given image.

Resamples an image using the given parameters.

Parameters
inputImageThe image to be processed.
outputSizeAn array of dimensions the image should be resampled to.
Returns
The processed image is returned after the filter has finished.

Definition at line 96 of file mitkPhotoacousticFilterService.cpp.

References mitk::CastToItkImage(), ConvertToFloat(), and mitk::GrabItkImageMemory().

◆ ApplyResamplingToDim()

mitk::Image::Pointer mitk::PhotoacousticFilterService::ApplyResamplingToDim ( mitk::Image::Pointer  inputImage,
double *  outputDimension 
)

◆ ConvertToFloat()

mitk::Image::Pointer mitk::PhotoacousticFilterService::ConvertToFloat ( mitk::Image::Pointer  inputImage)
protected

◆ ExtendImage()

mitk::Image::Pointer mitk::PhotoacousticFilterService::ExtendImage ( mitk::Image::Pointer  inputImage,
float  pixelColor,
unsigned int  outputDimensionY 
)

◆ mitkClassMacroItkParent()

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

◆ New()

static Pointer mitk::PhotoacousticFilterService::New ( )
static

Referenced by main().

Member Data Documentation

◆ m_BeamformingFilter

mitk::BeamformingFilter::Pointer mitk::PhotoacousticFilterService::m_BeamformingFilter
protected

For performance reasons, an instance of the Beamforming filter is initialized as soon as possible and kept for all further uses.

Definition at line 120 of file mitkPhotoacousticFilterService.h.

Referenced by ApplyBeamforming().


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