Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitk::USDiPhASImageSource Class Reference

Implementation of mitk::USImageSource for DiPhAS API devices. The method mitk::USImageSource::GetNextRawImage() is implemented for getting images from the DiPhAS API. More...

#include <mitkUSDiPhASImageSource.h>

Inheritance diagram for mitk::USDiPhASImageSource:
Collaboration diagram for mitk::USDiPhASImageSource:

Public Types

typedef itk::Image< float, 3 > itkFloatImageType
 
typedef mitk::USDiPhASDeviceCustomControls::DataType DataType
 
typedef mitk::USDiPhASDeviceCustomControls::SavingSettings SavingSettings
 

Public Member Functions

 mitkClassMacro (USDiPhASImageSource, USImageSource)
 
 mitkNewMacro1Param (Self, mitk::USDiPhASDevice *)
 
Pointer Clone () const
 
virtual void GetNextRawImage (std::vector< mitk::Image::Pointer > &) override
 
void ImageDataCallback (short *rfDataChannelData, int &channelDataChannelsPerDataset, int &channelDataSamplesPerChannel, int &channelDataTotalDatasets, short *rfDataArrayBeamformed, int &beamformedLines, int &beamformedSamples, int &beamformedTotalDatasets, unsigned char *imageData, int &imageWidth, int &imageHeight, int &imagePixelFormat, int &imageSetsTotal, double &timeStamp)
 
void SetGUIOutput (std::function< void(QString)> out)
 
void SetRecordingStatus (bool record)
 
void SetSavingSettings (SavingSettings settings)
 
void SetVerticalSpacing (float mm)
 
void ModifyDataType (DataType dataT)
 
void ModifyUseBModeFilter (bool isSet)
 
void ModifyScatteringCoefficient (int coeff)
 
void ModifyCompensateForScattering (bool useIt)
 
void ModifyEnergyCompensation (bool compensate)
 
void UpdateImageGeometry ()
 
- Public Member Functions inherited from mitk::USImageSource
 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...
 

Protected Member Functions

void SetDataType (DataType dataT)
 
void SetUseBModeFilter (bool isSet)
 
 USDiPhASImageSource (mitk::USDiPhASDevice *device)
 
virtual ~USDiPhASImageSource ()
 
mitk::Image::Pointer ApplyBmodeFilter (mitk::Image::Pointer image, bool useLogFilter=false)
 
mitk::Image::Pointer CutOffTop (mitk::Image::Pointer image, int cutOffSize=165)
 
mitk::Image::Pointer ResampleOutputVertical (mitk::Image::Pointer image, float verticalSpacing=0.1)
 
mitk::Image::Pointer ApplyScatteringCompensation (mitk::Image::Pointer inputImage, int scatteringCoefficient)
 
mitk::Image::Pointer ApplyResampling (mitk::Image::Pointer inputImage, mitk::Vector3D outputSpacing, unsigned int outputSize[3])
 
mitk::Image::Pointer MultiplyImage (mitk::Image::Pointer inputImage, double value)
 
void OrderImagesInterleaved (Image::Pointer PAImage, Image::Pointer USImage, std::vector< Image::Pointer > recordedList, bool raw)
 
void OrderImagesUltrasound (Image::Pointer USImage, std::vector< Image::Pointer > recordedList)
 
void GetPixelValues (itk::Index< 3 > pixel, std::vector< float > &values)
 
float GetPixelValue (itk::Index< 3 > pixel)
 
- Protected Member Functions inherited from mitk::USImageSource
 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...
 

Protected Attributes

std::vector< mitk::Image::Pointerm_RecordedImages
 
std::vector< mitk::Image::Pointerm_RawRecordedImages
 
std::vector< long long > m_ImageTimestampRecord
 
std::vector< long long > m_ImageTimestampBuffer
 
long long m_CurrentImageTimestamp
 
bool m_CurrentlyRecording
 
mitk::OphirPyro::Pointer m_Pyro
 
bool m_PyroConnected
 
std::vector< Image::Pointerm_FluenceCompOriginal
 
std::vector< Image::Pointerm_FluenceCompResized
 
std::vector< itk::Image< float, 3 >::Pointer > m_FluenceCompResizedItk
 
std::vector< mitk::Image::Pointerm_ImageBuffer
 
int m_LastWrittenImage
 
int m_BufferSize
 
unsigned int m_ImageDimensions [3]
 
mitk::Vector3D m_ImageSpacing
 
std::vector< float > m_PixelValues
 
mitk::USDiPhASDevicem_Device
 
std::function< void(QString)> m_GUIOutput
 
SavingSettings m_SavingSettings
 
float m_StartTime
 
bool m_UseGUIOutPut
 
BeamformerStateInfoNative m_BeamformerInfos
 
bool m_UseBModeFilter
 
bool m_DataTypeModified
 
DataType m_DataTypeNext
 
bool m_UseBModeFilterModified
 
bool m_UseBModeFilterNext
 
float m_VerticalSpacing
 
float m_VerticalSpacingNext
 
bool m_VerticalSpacingModified
 
int m_ScatteringCoefficient
 
int m_ScatteringCoefficientNext
 
bool m_ScatteringCoefficientModified
 
bool m_CompensateForScattering
 
bool m_CompensateForScatteringNext
 
bool m_CompensateForScatteringModified
 
bool m_CompensateEnergy
 
bool m_CompensateEnergyNext
 
bool m_CompensateEnergyModified
 
DataType m_DataType
 
- Protected Attributes inherited from mitk::USImageSource
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...
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::USImageSource
static const char * IMAGE_PROPERTY_IDENTIFIER
 

Detailed Description

Implementation of mitk::USImageSource for DiPhAS API devices. The method mitk::USImageSource::GetNextRawImage() is implemented for getting images from the DiPhAS API.

The image data is given to this class from the DiPhAS API by calling a callback method that writes the image data to an mitk::image

Definition at line 45 of file mitkUSDiPhASImageSource.h.

Member Typedef Documentation

◆ DataType

◆ itkFloatImageType

◆ SavingSettings

Constructor & Destructor Documentation

◆ USDiPhASImageSource()

mitk::USDiPhASImageSource::USDiPhASImageSource ( mitk::USDiPhASDevice device)
protected

◆ ~USDiPhASImageSource()

mitk::USDiPhASImageSource::~USDiPhASImageSource ( )
protectedvirtual

Definition at line 81 of file mitkUSDiPhASImageSource.cpp.

References m_Pyro, m_PyroConnected, and MITK_INFO.

Member Function Documentation

◆ ApplyBmodeFilter()

mitk::Image::Pointer mitk::USDiPhASImageSource::ApplyBmodeFilter ( mitk::Image::Pointer  image,
bool  useLogFilter = false 
)
protected

◆ ApplyResampling()

mitk::Image::Pointer mitk::USDiPhASImageSource::ApplyResampling ( mitk::Image::Pointer  inputImage,
mitk::Vector3D  outputSpacing,
unsigned int  outputSize[3] 
)
protected

Definition at line 380 of file mitkUSDiPhASImageSource.cpp.

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

Referenced by GetNextRawImage().

◆ ApplyScatteringCompensation()

mitk::Image::Pointer mitk::USDiPhASImageSource::ApplyScatteringCompensation ( mitk::Image::Pointer  inputImage,
int  scatteringCoefficient 
)
protected

◆ Clone()

Pointer mitk::USDiPhASImageSource::Clone ( ) const

◆ CutOffTop()

mitk::Image::Pointer mitk::USDiPhASImageSource::CutOffTop ( mitk::Image::Pointer  image,
int  cutOffSize = 165 
)
protected

Definition at line 318 of file mitkUSDiPhASImageSource.cpp.

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

Referenced by GetNextRawImage().

◆ GetNextRawImage()

◆ GetPixelValue()

float mitk::USDiPhASImageSource::GetPixelValue ( itk::Index< 3 >  pixel)
protected

◆ GetPixelValues()

void mitk::USDiPhASImageSource::GetPixelValues ( itk::Index< 3 >  pixel,
std::vector< float > &  values 
)
protected

Definition at line 841 of file mitkUSDiPhASImageSource.cpp.

References ApplyBmodeFilter(), image, and m_RecordedImages.

Referenced by SetRecordingStatus().

◆ ImageDataCallback()

void mitk::USDiPhASImageSource::ImageDataCallback ( short *  rfDataChannelData,
int &  channelDataChannelsPerDataset,
int &  channelDataSamplesPerChannel,
int &  channelDataTotalDatasets,
short *  rfDataArrayBeamformed,
int &  beamformedLines,
int &  beamformedSamples,
int &  beamformedTotalDatasets,
unsigned char *  imageData,
int &  imageWidth,
int &  imageHeight,
int &  imagePixelFormat,
int &  imageSetsTotal,
double &  timeStamp 
)

◆ mitkClassMacro()

mitk::USDiPhASImageSource::mitkClassMacro ( USDiPhASImageSource  ,
USImageSource   
)

◆ mitkNewMacro1Param()

mitk::USDiPhASImageSource::mitkNewMacro1Param ( Self  ,
mitk::USDiPhASDevice  
)

◆ ModifyCompensateForScattering()

void mitk::USDiPhASImageSource::ModifyCompensateForScattering ( bool  useIt)

◆ ModifyDataType()

void mitk::USDiPhASImageSource::ModifyDataType ( DataType  dataT)

Definition at line 632 of file mitkUSDiPhASImageSource.cpp.

References m_DataTypeModified, and m_DataTypeNext.

◆ ModifyEnergyCompensation()

void mitk::USDiPhASImageSource::ModifyEnergyCompensation ( bool  compensate)

◆ ModifyScatteringCoefficient()

void mitk::USDiPhASImageSource::ModifyScatteringCoefficient ( int  coeff)

◆ ModifyUseBModeFilter()

void mitk::USDiPhASImageSource::ModifyUseBModeFilter ( bool  isSet)

◆ MultiplyImage()

mitk::Image::Pointer mitk::USDiPhASImageSource::MultiplyImage ( mitk::Image::Pointer  inputImage,
double  value 
)
protected

Definition at line 412 of file mitkUSDiPhASImageSource.cpp.

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

Referenced by GetNextRawImage().

◆ OrderImagesInterleaved()

void mitk::USDiPhASImageSource::OrderImagesInterleaved ( Image::Pointer  PAImage,
Image::Pointer  USImage,
std::vector< Image::Pointer recordedList,
bool  raw 
)
protected

◆ OrderImagesUltrasound()

void mitk::USDiPhASImageSource::OrderImagesUltrasound ( Image::Pointer  USImage,
std::vector< Image::Pointer recordedList 
)
protected

◆ ResampleOutputVertical()

mitk::Image::Pointer mitk::USDiPhASImageSource::ResampleOutputVertical ( mitk::Image::Pointer  image,
float  verticalSpacing = 0.1 
)
protected

Definition at line 338 of file mitkUSDiPhASImageSource.cpp.

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

Referenced by GetNextRawImage().

◆ SetDataType()

void mitk::USDiPhASImageSource::SetDataType ( DataType  dataT)
protected

◆ SetGUIOutput()

void mitk::USDiPhASImageSource::SetGUIOutput ( std::function< void(QString)>  out)

◆ SetRecordingStatus()

◆ SetSavingSettings()

void mitk::USDiPhASImageSource::SetSavingSettings ( SavingSettings  settings)

◆ SetUseBModeFilter()

void mitk::USDiPhASImageSource::SetUseBModeFilter ( bool  isSet)
protected

Definition at line 687 of file mitkUSDiPhASImageSource.cpp.

References m_UseBModeFilter.

Referenced by GetNextRawImage().

◆ SetVerticalSpacing()

void mitk::USDiPhASImageSource::SetVerticalSpacing ( float  mm)

◆ UpdateImageGeometry()

void mitk::USDiPhASImageSource::UpdateImageGeometry ( )

Sets the spacing used in the image based on the informations of the ScanMode in USDiPhAS Device

Definition at line 602 of file mitkUSDiPhASImageSource.cpp.

References mitk::USDiPhASDevice::GetScanMode(), m_DataType, m_Device, m_ImageSpacing, and MITK_INFO.

Referenced by GetNextRawImage().

Member Data Documentation

◆ m_BeamformerInfos

BeamformerStateInfoNative mitk::USDiPhASImageSource::m_BeamformerInfos
protected

Definition at line 160 of file mitkUSDiPhASImageSource.h.

◆ m_BufferSize

int mitk::USDiPhASImageSource::m_BufferSize
protected

Definition at line 127 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback(), and USDiPhASImageSource().

◆ m_CompensateEnergy

bool mitk::USDiPhASImageSource::m_CompensateEnergy
protected

Definition at line 181 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage().

◆ m_CompensateEnergyModified

bool mitk::USDiPhASImageSource::m_CompensateEnergyModified
protected

Definition at line 183 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyEnergyCompensation().

◆ m_CompensateEnergyNext

bool mitk::USDiPhASImageSource::m_CompensateEnergyNext
protected

Definition at line 182 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyEnergyCompensation().

◆ m_CompensateForScattering

bool mitk::USDiPhASImageSource::m_CompensateForScattering
protected

Definition at line 177 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage().

◆ m_CompensateForScatteringModified

bool mitk::USDiPhASImageSource::m_CompensateForScatteringModified
protected

Definition at line 179 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyCompensateForScattering().

◆ m_CompensateForScatteringNext

bool mitk::USDiPhASImageSource::m_CompensateForScatteringNext
protected

Definition at line 178 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyCompensateForScattering().

◆ m_CurrentImageTimestamp

long long mitk::USDiPhASImageSource::m_CurrentImageTimestamp
protected

Definition at line 116 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback().

◆ m_CurrentlyRecording

bool mitk::USDiPhASImageSource::m_CurrentlyRecording
protected

Definition at line 117 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback(), and SetRecordingStatus().

◆ m_DataType

DataType mitk::USDiPhASImageSource::m_DataType
protected

◆ m_DataTypeModified

bool mitk::USDiPhASImageSource::m_DataTypeModified
protected

Definition at line 163 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), ImageDataCallback(), and ModifyDataType().

◆ m_DataTypeNext

DataType mitk::USDiPhASImageSource::m_DataTypeNext
protected

Definition at line 164 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyDataType().

◆ m_Device

◆ m_FluenceCompOriginal

std::vector<Image::Pointer> mitk::USDiPhASImageSource::m_FluenceCompOriginal
protected

Definition at line 121 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and USDiPhASImageSource().

◆ m_FluenceCompResized

std::vector<Image::Pointer> mitk::USDiPhASImageSource::m_FluenceCompResized
protected

Definition at line 122 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and USDiPhASImageSource().

◆ m_FluenceCompResizedItk

std::vector<itk::Image<float, 3>::Pointer> mitk::USDiPhASImageSource::m_FluenceCompResizedItk
protected

◆ m_GUIOutput

std::function<void(QString)> mitk::USDiPhASImageSource::m_GUIOutput
protected

This is a callback to pass text data to the GUI.

Definition at line 150 of file mitkUSDiPhASImageSource.h.

Referenced by SetGUIOutput().

◆ m_ImageBuffer

std::vector<mitk::Image::Pointer> mitk::USDiPhASImageSource::m_ImageBuffer
protected

◆ m_ImageDimensions

unsigned int mitk::USDiPhASImageSource::m_ImageDimensions[3]
protected

Definition at line 129 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback().

◆ m_ImageSpacing

mitk::Vector3D mitk::USDiPhASImageSource::m_ImageSpacing
protected

Definition at line 130 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback(), and UpdateImageGeometry().

◆ m_ImageTimestampBuffer

std::vector<long long> mitk::USDiPhASImageSource::m_ImageTimestampBuffer
protected

◆ m_ImageTimestampRecord

std::vector<long long> mitk::USDiPhASImageSource::m_ImageTimestampRecord
protected

Definition at line 114 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback(), and SetRecordingStatus().

◆ m_LastWrittenImage

int mitk::USDiPhASImageSource::m_LastWrittenImage
protected

◆ m_PixelValues

std::vector<float> mitk::USDiPhASImageSource::m_PixelValues
protected

Definition at line 145 of file mitkUSDiPhASImageSource.h.

Referenced by SetRecordingStatus().

◆ m_Pyro

mitk::OphirPyro::Pointer mitk::USDiPhASImageSource::m_Pyro
protected

◆ m_PyroConnected

bool mitk::USDiPhASImageSource::m_PyroConnected
protected

Definition at line 119 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback(), and ~USDiPhASImageSource().

◆ m_RawRecordedImages

std::vector<mitk::Image::Pointer> mitk::USDiPhASImageSource::m_RawRecordedImages
protected

Definition at line 113 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback(), and SetRecordingStatus().

◆ m_RecordedImages

std::vector<mitk::Image::Pointer> mitk::USDiPhASImageSource::m_RecordedImages
protected

This vector holds all the images we record, if recording is set to active.

Definition at line 112 of file mitkUSDiPhASImageSource.h.

Referenced by GetPixelValues(), ImageDataCallback(), and SetRecordingStatus().

◆ m_SavingSettings

SavingSettings mitk::USDiPhASImageSource::m_SavingSettings
protected

Variables for management of current state.

Definition at line 155 of file mitkUSDiPhASImageSource.h.

Referenced by ImageDataCallback(), SetRecordingStatus(), and SetSavingSettings().

◆ m_ScatteringCoefficient

int mitk::USDiPhASImageSource::m_ScatteringCoefficient
protected

Definition at line 173 of file mitkUSDiPhASImageSource.h.

Referenced by ApplyScatteringCompensation(), and GetNextRawImage().

◆ m_ScatteringCoefficientModified

bool mitk::USDiPhASImageSource::m_ScatteringCoefficientModified
protected

Definition at line 175 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyScatteringCoefficient().

◆ m_ScatteringCoefficientNext

int mitk::USDiPhASImageSource::m_ScatteringCoefficientNext
protected

Definition at line 174 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyScatteringCoefficient().

◆ m_StartTime

float mitk::USDiPhASImageSource::m_StartTime
protected

Definition at line 157 of file mitkUSDiPhASImageSource.h.

Referenced by SetGUIOutput().

◆ m_UseBModeFilter

bool mitk::USDiPhASImageSource::m_UseBModeFilter
protected

Definition at line 161 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and SetUseBModeFilter().

◆ m_UseBModeFilterModified

bool mitk::USDiPhASImageSource::m_UseBModeFilterModified
protected

Definition at line 166 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyUseBModeFilter().

◆ m_UseBModeFilterNext

bool mitk::USDiPhASImageSource::m_UseBModeFilterNext
protected

Definition at line 167 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and ModifyUseBModeFilter().

◆ m_UseGUIOutPut

bool mitk::USDiPhASImageSource::m_UseGUIOutPut
protected

Definition at line 158 of file mitkUSDiPhASImageSource.h.

Referenced by SetGUIOutput().

◆ m_VerticalSpacing

float mitk::USDiPhASImageSource::m_VerticalSpacing
protected

Definition at line 169 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage().

◆ m_VerticalSpacingModified

bool mitk::USDiPhASImageSource::m_VerticalSpacingModified
protected

Definition at line 171 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and SetVerticalSpacing().

◆ m_VerticalSpacingNext

float mitk::USDiPhASImageSource::m_VerticalSpacingNext
protected

Definition at line 170 of file mitkUSDiPhASImageSource.h.

Referenced by GetNextRawImage(), and SetVerticalSpacing().


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