Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
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>
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 () |
![]() | |
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::Pointer > | 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(). More... | |
Additional Inherited Members | |
![]() | |
static const char * | IMAGE_PROPERTY_IDENTIFIER |
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.
Definition at line 54 of file mitkUSDiPhASImageSource.h.
typedef itk::Image< float, 3 > mitk::USDiPhASImageSource::itkFloatImageType |
Definition at line 51 of file mitkUSDiPhASImageSource.h.
typedef mitk::USDiPhASDeviceCustomControls::SavingSettings mitk::USDiPhASImageSource::SavingSettings |
Definition at line 55 of file mitkUSDiPhASImageSource.h.
|
protected |
Definition at line 37 of file mitkUSDiPhASImageSource.cpp.
References m_BufferSize, m_FluenceCompOriginal, m_FluenceCompResized, m_FluenceCompResizedItk, m_ImageBuffer, m_ImageTimestampBuffer, m_LastWrittenImage, and mitk::Image::New().
|
protectedvirtual |
Definition at line 81 of file mitkUSDiPhASImageSource.cpp.
References m_Pyro, m_PyroConnected, and MITK_INFO.
|
protected |
Definition at line 287 of file mitkUSDiPhASImageSource.cpp.
References mitk::CastToItkImage(), and mitk::GrabItkImageMemory().
Referenced by GetNextRawImage(), and GetPixelValues().
|
protected |
Definition at line 380 of file mitkUSDiPhASImageSource.cpp.
References mitk::CastToItkImage(), and mitk::GrabItkImageMemory().
Referenced by GetNextRawImage().
|
protected |
Definition at line 366 of file mitkUSDiPhASImageSource.cpp.
References mitk::CastToItkImage(), mitk::GrabItkImageMemory(), m_FluenceCompResizedItk, and m_ScatteringCoefficient.
Referenced by GetNextRawImage().
Pointer mitk::USDiPhASImageSource::Clone | ( | ) | const |
|
protected |
Definition at line 318 of file mitkUSDiPhASImageSource.cpp.
References mitk::CastToItkImage(), and mitk::GrabItkImageMemory().
Referenced by GetNextRawImage().
|
overridevirtual |
Implementation of the superclass method. Returns the pointer to the mitk::Image filled by DiPhAS API callback.
Implements mitk::USImageSource.
Definition at line 90 of file mitkUSDiPhASImageSource.cpp.
References ApplyBmodeFilter(), ApplyResampling(), ApplyScatteringCompensation(), mitk::CastToItkImage(), CutOffTop(), mitk::USDiPhASDevice::GetScanMode(), mitk::GrabItkImageMemory(), image, m_CompensateEnergy, m_CompensateEnergyModified, m_CompensateEnergyNext, m_CompensateForScattering, m_CompensateForScatteringModified, m_CompensateForScatteringNext, m_DataType, m_DataTypeModified, m_DataTypeNext, m_Device, m_FluenceCompOriginal, m_FluenceCompResized, m_FluenceCompResizedItk, m_ImageBuffer, m_ImageTimestampBuffer, m_LastWrittenImage, m_Pyro, m_ScatteringCoefficient, m_ScatteringCoefficientModified, m_ScatteringCoefficientNext, m_UseBModeFilter, m_UseBModeFilterModified, m_UseBModeFilterNext, m_VerticalSpacing, m_VerticalSpacingModified, m_VerticalSpacingNext, MITK_INFO, MultiplyImage(), mitk::Image::New(), ResampleOutputVertical(), SetDataType(), SetUseBModeFilter(), and UpdateImageGeometry().
|
protected |
|
protected |
Definition at line 841 of file mitkUSDiPhASImageSource.cpp.
References ApplyBmodeFilter(), image, and m_RecordedImages.
Referenced by SetRecordingStatus().
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 | ||
) |
The API calls this function to pass the image data to the user; here the m_Image is updated
Definition at line 426 of file mitkUSDiPhASImageSource.cpp.
References mitk::USDiPhASDevice::GetScanMode(), image, line, m_BufferSize, m_CurrentImageTimestamp, m_CurrentlyRecording, m_DataType, m_DataTypeModified, m_Device, m_ImageBuffer, m_ImageDimensions, m_ImageSpacing, m_ImageTimestampBuffer, m_ImageTimestampRecord, m_LastWrittenImage, m_Pyro, m_PyroConnected, m_RawRecordedImages, m_RecordedImages, m_SavingSettings, MITK_INFO, mitk::OphirPyro::New(), mitk::Image::New(), offset, and mitk::USDiPhASDeviceCustomControls::SavingSettings::saveRaw.
Referenced by WrapperImageDataCallback().
mitk::USDiPhASImageSource::mitkClassMacro | ( | USDiPhASImageSource | , |
USImageSource | |||
) |
mitk::USDiPhASImageSource::mitkNewMacro1Param | ( | Self | , |
mitk::USDiPhASDevice * | |||
) |
void mitk::USDiPhASImageSource::ModifyCompensateForScattering | ( | bool | useIt | ) |
Definition at line 650 of file mitkUSDiPhASImageSource.cpp.
References m_CompensateForScatteringModified, and m_CompensateForScatteringNext.
Referenced by mitk::USDiPhASCustomControls::OnSetCompensateScattering().
void mitk::USDiPhASImageSource::ModifyDataType | ( | DataType | dataT | ) |
Definition at line 632 of file mitkUSDiPhASImageSource.cpp.
References m_DataTypeModified, and m_DataTypeNext.
void mitk::USDiPhASImageSource::ModifyEnergyCompensation | ( | bool | compensate | ) |
Definition at line 656 of file mitkUSDiPhASImageSource.cpp.
References m_CompensateEnergyModified, and m_CompensateEnergyNext.
Referenced by mitk::USDiPhASCustomControls::OnSetCompensateEnergy().
void mitk::USDiPhASImageSource::ModifyScatteringCoefficient | ( | int | coeff | ) |
Definition at line 644 of file mitkUSDiPhASImageSource.cpp.
References m_ScatteringCoefficientModified, and m_ScatteringCoefficientNext.
Referenced by mitk::USDiPhASCustomControls::OnSetScatteringCoefficient().
void mitk::USDiPhASImageSource::ModifyUseBModeFilter | ( | bool | isSet | ) |
Definition at line 638 of file mitkUSDiPhASImageSource.cpp.
References m_UseBModeFilterModified, and m_UseBModeFilterNext.
Referenced by mitk::USDiPhASCustomControls::OnSetUseBModeFilter().
|
protected |
Definition at line 412 of file mitkUSDiPhASImageSource.cpp.
References mitk::CastToItkImage(), and mitk::GrabItkImageMemory().
Referenced by GetNextRawImage().
|
protected |
Definition at line 852 of file mitkUSDiPhASImageSource.cpp.
References mitk::USDiPhASDevice::GetScanMode(), m_DataType, and m_Device.
Referenced by SetRecordingStatus().
|
protected |
Definition at line 900 of file mitkUSDiPhASImageSource.cpp.
References mitk::USDiPhASDevice::GetScanMode(), m_DataType, and m_Device.
Referenced by SetRecordingStatus().
|
protected |
Definition at line 338 of file mitkUSDiPhASImageSource.cpp.
References mitk::CastToItkImage(), and mitk::GrabItkImageMemory().
Referenced by GetNextRawImage().
|
protected |
Definition at line 662 of file mitkUSDiPhASImageSource.cpp.
References mitk::USDiPhASDevice::GetScanMode(), m_DataType, m_Device, and MITK_INFO.
Referenced by GetNextRawImage().
void mitk::USDiPhASImageSource::SetGUIOutput | ( | std::function< void(QString)> | out | ) |
Definition at line 680 of file mitkUSDiPhASImageSource.cpp.
References m_GUIOutput, m_StartTime, and m_UseGUIOutPut.
Referenced by mitk::USDiPhASCustomControls::passGUIOut().
void mitk::USDiPhASImageSource::SetRecordingStatus | ( | bool | record | ) |
This starts or ends the recording session
Definition at line 714 of file mitkUSDiPhASImageSource.cpp.
References GetPixelValues(), mitk::USDiPhASDevice::GetScanMode(), m_CurrentlyRecording, m_Device, m_ImageTimestampRecord, m_PixelValues, m_Pyro, m_RawRecordedImages, m_RecordedImages, m_SavingSettings, mitk::Image::New(), OrderImagesInterleaved(), OrderImagesUltrasound(), replaceAll(), mitk::IOUtil::Save(), mitk::USDiPhASDeviceCustomControls::SavingSettings::saveBeamformed, mitk::USDiPhASDeviceCustomControls::SavingSettings::saveRaw, and mitk::USDiPhASDevice::UpdateScanmode().
Referenced by mitk::USDiPhASCustomControls::OnSetRecord().
void mitk::USDiPhASImageSource::SetSavingSettings | ( | SavingSettings | settings | ) |
Definition at line 698 of file mitkUSDiPhASImageSource.cpp.
References m_SavingSettings.
Referenced by mitk::USDiPhASCustomControls::OnSetSavingSettings().
|
protected |
Definition at line 687 of file mitkUSDiPhASImageSource.cpp.
References m_UseBModeFilter.
Referenced by GetNextRawImage().
void mitk::USDiPhASImageSource::SetVerticalSpacing | ( | float | mm | ) |
Definition at line 692 of file mitkUSDiPhASImageSource.cpp.
References m_VerticalSpacingModified, and m_VerticalSpacingNext.
Referenced by mitk::USDiPhASCustomControls::OnSetVerticalSpacing().
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().
|
protected |
Definition at line 160 of file mitkUSDiPhASImageSource.h.
|
protected |
Definition at line 127 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback(), and USDiPhASImageSource().
|
protected |
Definition at line 181 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage().
|
protected |
Definition at line 183 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyEnergyCompensation().
|
protected |
Definition at line 182 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyEnergyCompensation().
|
protected |
Definition at line 177 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage().
|
protected |
Definition at line 179 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyCompensateForScattering().
|
protected |
Definition at line 178 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyCompensateForScattering().
|
protected |
Definition at line 116 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback().
|
protected |
Definition at line 117 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback(), and SetRecordingStatus().
|
protected |
Definition at line 185 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), ImageDataCallback(), OrderImagesInterleaved(), OrderImagesUltrasound(), SetDataType(), and UpdateImageGeometry().
|
protected |
Definition at line 163 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), ImageDataCallback(), and ModifyDataType().
|
protected |
Definition at line 164 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyDataType().
|
protected |
Definition at line 147 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), ImageDataCallback(), OrderImagesInterleaved(), OrderImagesUltrasound(), SetDataType(), SetRecordingStatus(), and UpdateImageGeometry().
|
protected |
Definition at line 121 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and USDiPhASImageSource().
|
protected |
Definition at line 122 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and USDiPhASImageSource().
|
protected |
Definition at line 123 of file mitkUSDiPhASImageSource.h.
Referenced by ApplyScatteringCompensation(), GetNextRawImage(), and USDiPhASImageSource().
|
protected |
This is a callback to pass text data to the GUI.
Definition at line 150 of file mitkUSDiPhASImageSource.h.
Referenced by SetGUIOutput().
|
protected |
Definition at line 125 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), ImageDataCallback(), and USDiPhASImageSource().
|
protected |
Definition at line 129 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback().
|
protected |
Definition at line 130 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback(), and UpdateImageGeometry().
|
protected |
Definition at line 115 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), ImageDataCallback(), and USDiPhASImageSource().
|
protected |
Definition at line 114 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback(), and SetRecordingStatus().
|
protected |
Definition at line 126 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), ImageDataCallback(), and USDiPhASImageSource().
|
protected |
Definition at line 145 of file mitkUSDiPhASImageSource.h.
Referenced by SetRecordingStatus().
|
protected |
Definition at line 118 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), ImageDataCallback(), SetRecordingStatus(), and ~USDiPhASImageSource().
|
protected |
Definition at line 119 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback(), and ~USDiPhASImageSource().
|
protected |
Definition at line 113 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback(), and SetRecordingStatus().
|
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().
|
protected |
Variables for management of current state.
Definition at line 155 of file mitkUSDiPhASImageSource.h.
Referenced by ImageDataCallback(), SetRecordingStatus(), and SetSavingSettings().
|
protected |
Definition at line 173 of file mitkUSDiPhASImageSource.h.
Referenced by ApplyScatteringCompensation(), and GetNextRawImage().
|
protected |
Definition at line 175 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyScatteringCoefficient().
|
protected |
Definition at line 174 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyScatteringCoefficient().
|
protected |
Definition at line 157 of file mitkUSDiPhASImageSource.h.
Referenced by SetGUIOutput().
|
protected |
Definition at line 161 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and SetUseBModeFilter().
|
protected |
Definition at line 166 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyUseBModeFilter().
|
protected |
Definition at line 167 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and ModifyUseBModeFilter().
|
protected |
Definition at line 158 of file mitkUSDiPhASImageSource.h.
Referenced by SetGUIOutput().
|
protected |
Definition at line 169 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage().
|
protected |
Definition at line 171 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and SetVerticalSpacing().
|
protected |
Definition at line 170 of file mitkUSDiPhASImageSource.h.
Referenced by GetNextRawImage(), and SetVerticalSpacing().