IUF-SDK-3
Interventional Ultrasound Library
iufInputFile.c File Reference

Data Structures

struct  IufInputFileInstance
 
struct  IufInputFile
 

Functions

iuifi_t iufInputFileInstanceCreate (void)
 
int iufInputFileInstanceDelete (iuifi_t instance)
 
int iufInputFileDelete (iuif_t inputFile)
 Creates a datablock for a single channel (i.e. numSamplesPerLine floats) for the acquisition with the name label. More...
 
iuif_t iufInputFileCreate (const char *filename)
 Create an empty file instance with a filename. More...
 
int iufInputFileGetNumFrames (iuif_t inputFile)
 Returns the number of frames an inputFile has. More...
 
int iufInputFileGetNumChannels (iuif_t inputFile, char *label)
 Gets the number of channels for the patternList type label. More...
 
int iufInputFileGetSamplesPerLine (iuif_t inputFile, char *label)
 Gets the number of samples per line for this label. More...
 
int iufInputFileGetNumResponses (iuif_t inputFile, char *label)
 Gets the number of responses for the patternList type label. More...
 
iud_t iufInputFileFrameCreate (iuif_t inputFile, char *label)
 Creates a datablock for a frame for the acquisition with the name label. More...
 
iud_t iufInputFileResponseCreate (iuif_t inputFile, char *label)
 Creates a datablock for a response (numSamplesPerLine * numChannels) for the acquisition with the name label. More...
 
iud_t iufInputFileChannelCreate (iuif_t inputFile, char *label)
 Creates a datablock for a single channel (i.e. numSamplesPerLine floats) for the acquisition with the name label. More...
 
void * iufInputFileInstanceLoad (hid_t handle)
 
iuif_t iufInputFileNodeLoad (const char *pFilename)
 Load an inputFile instance from a file. More...
 
int iufInputFileSaveInstance (hid_t handle, iuifi_t instanceData)
 
int iufInputFileNodeSave (iuif_t inputFile)
 Save (serialize) the inputFile instance to file. More...
 
int iufInputFileClose (iuif_t inputFile)
 Closes access to the inputFile. More...
 
int iufInputFileCompareInstance (iuifi_t reference, iuifi_t actual)
 
int iufInputFileCompare (iuif_t reference, iuif_t actual)
 Compares two inputFile instances with each other. More...
 
iufl_t iufInputFileGetFrameList (iuif_t inputFile)
 Gets the IufFrameList object from an inputFile. More...
 
iupald_t iufInputFileGetPatternListDict (iuif_t inputFile)
 Gets the IufPatternListDict object from an inputFile. More...
 
iupd_t iufInputFileGetPulseDict (iuif_t inputFile)
 Gets the IufPulseDict object from an inputFile. More...
 
iusd_t iufInputFileGetSourceDict (iuif_t inputFile)
 Gets the IufSourceDict object from an inputFile. More...
 
iurcmd_t iufInputFileGetReceiveChannelMapDict (iuif_t inputFile)
 Gets the IufReceiveChannelMapDict object from an inputFile. More...
 
iutad_t iufInputFileGetTransmitApodizationDict (iuif_t inputFile)
 Gets the IufTransmitApodizationDict object from an inputFile. More...
 
iursd_t iufInputFileGetReceiveSettingsDict (iuif_t inputFile)
 Gets the IufReceiveSettingsDict object from an inputFile. More...
 
iua_t iufInputFileGetAcquisition (iuif_t inputFile)
 Gets the IufAcquisition object from an inputFile. More...
 
iut_t iufInputFileGetTransducer (iuif_t inputFile)
 Gets the IufTransducer object from an inputFile. More...
 
int iufInputFileSetFrameList (iuif_t inputFile, iufl_t frameList)
 Sets the frameList of an inputFile. More...
 
int iufInputFileSetPatternListDict (iuif_t inputFile, iupald_t patternListDict)
 Sets the patternListDict of an inputFile. More...
 
int iufInputFileSetPulseDict (iuif_t inputFile, iupd_t pulseDict)
 Sets the pulseDict of an inputFile. More...
 
int iufInputFileSetSourceDict (iuif_t inputFile, iusd_t sourceDict)
 Sets the sourceDict of an inputFile. More...
 
int iufInputFileSetReceiveChannelMapDict (iuif_t inputFile, iurcmd_t receiveChannelMapDict)
 Sets the receiveChannelMap of an inputFile. More...
 
int iufInputFileSetTransmitApodizationDict (iuif_t inputFile, iutad_t transmitApodizationDict)
 Sets the transmitApodizationDict of an inputFile. More...
 
int iufInputFileSetReceiveSettingsDict (iuif_t inputFile, iursd_t receiveSettingsDict)
 Sets the receiveSettingsDict of an inputFile. More...
 
int iufInputFileSetAcquisition (iuif_t inputFile, iua_t acquisition)
 Sets the acquisition info of an inputFile. More...
 
int iufInputFileSetTransducer (iuif_t inputFile, iut_t transducer)
 Sets the transducer of an inputFile. More...
 
int iufInputFileSetFilename (iuif_t inputFile, char *fileName)
 
hid_t iufInputFileGetReadSpace (iuif_t inputFile, char *label)
 
int iufInputFileFrameSave (iuif_t inputFile, char *label, iud_t frame, iuo_t frame_offset)
 Saves a frame of data to an inputFile. More...
 
int iufInputFileResponseSave (iuif_t inputFile, char *label, iud_t response, iuo_t response_offset)
 Saves a channel of data to an inputFile. More...
 
int iufInputFileChannelSave (iuif_t inputFile, char *label, iud_t channel, iuo_t channel_offset)
 Saves a channel of data to an inputFile. More...
 
int iufInputFileFrameLoad (iuif_t inputFile, char *label, iud_t frame, iuo_t frame_offset)
 Loads a frame of data to an inputFile. More...
 
int iufInputFileResponseLoad (iuif_t inputFile, char *label, iud_t response, iuo_t response_offset)
 Loads a single response of data from an inputFile. More...
 
int iufInputFileChannelLoad (iuif_t inputFile, char *label, iud_t channel, iuo_t channel_offset)
 Loads a single channel of data from an inputFile. More...
 

Data Structure Documentation

◆ IufInputFileInstance

struct IufInputFileInstance
Data Fields
iua_t acquisition

The description of the performed acquisition

iudsd_t dataStreamDict

Contains dataset administration

IUF_BOOL deepDelete
iufl_t frameList
hid_t handle

HDF5 file handle

int IufVersion

The version of input file format

iupald_t patternListDict

a dictionary of pattern lists

const char * pFilename

the filename

iupd_t pulseDict

a dictionary of pulses

iusd_t pulseSourceDict

a dictionary of sources

iurcmd_t receiveChannelMapDict

a dictionary of receiveChannelMaps

iursd_t receiveSettingsDict

a dictionary of receiveSettings

iut_t transducer

The transducer description

iutad_t transmitApodizationDict

a dictionary of transmitApodizations

◆ IufInputFile

struct IufInputFile
Data Fields
iuhn_t history

Function Documentation

◆ iufInputFileChannelCreate()

iud_t iufInputFileChannelCreate ( iuif_t  inputFile,
char *  label 
)

Creates a datablock for a single channel (i.e. numSamplesPerLine floats) for the acquisition with the name label.

Returns
Returns an allocated memory block of a "label"-channel or IUD_INVALID in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe acquisition type

◆ iufInputFileChannelLoad()

int iufInputFileChannelLoad ( iuif_t  inputFile,
char *  label,
iud_t  channel,
iuo_t  channel_offset 
)

Loads a single channel of data from an inputFile.

Returns
Returns IUF_E_OK when succesful or <0 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe label of the patternList
channelThe channel data block to be filled
channel_offsetThe offset in the datablock

◆ iufInputFileChannelSave()

int iufInputFileChannelSave ( iuif_t  inputFile,
char *  label,
iud_t  channel,
iuo_t  channel_offset 
)

Saves a channel of data to an inputFile.

Returns
Returns IUF_E_OK when succesful or <0 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe label of the patternList
channelThe channel data to save
channel_offsetThe offsets in the datablock

◆ iufInputFileClose()

int iufInputFileClose ( iuif_t  inputFile)

Closes access to the inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileCompare()

int iufInputFileCompare ( iuif_t  reference,
iuif_t  actual 
)

Compares two inputFile instances with each other.

Returns
Returns IUF_TRUE when the inputFiles are equal and IUF_FALSE otherwise.
Parameters
referenceThe IufInputFile to compare to
actualThe IufInputFile to compare with

◆ iufInputFileCompareInstance()

int iufInputFileCompareInstance ( iuifi_t  reference,
iuifi_t  actual 
)

◆ iufInputFileCreate()

iuif_t iufInputFileCreate ( const char *  filename)

Create an empty file instance with a filename.

Returns
Returns the empty file instance when succesful or IUIF_INVALID in case of an error.
Parameters
filenameThe filename for the file instance.

◆ iufInputFileDelete()

int iufInputFileDelete ( iuif_t  inputFile)

Creates a datablock for a single channel (i.e. numSamplesPerLine floats) for the acquisition with the name label.

Returns
Returns an allocated memory block of a "label"-channel or IUD_INVALID in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileFrameCreate()

iud_t iufInputFileFrameCreate ( iuif_t  inputFile,
char *  label 
)

Creates a datablock for a frame for the acquisition with the name label.

Returns
Returns an allocated memory block of a "label"-frame or IUD_INVALID in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe acquisition type

◆ iufInputFileFrameLoad()

int iufInputFileFrameLoad ( iuif_t  inputFile,
char *  label,
iud_t  frame,
iuo_t  frame_offset 
)

Loads a frame of data to an inputFile.

Returns
Returns IUF_E_OK when succesful or <0 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe label of the patternList
frameThe frame of data
frame_offsetThe offset in the datablock

◆ iufInputFileFrameSave()

int iufInputFileFrameSave ( iuif_t  inputFile,
char *  label,
iud_t  frame,
iuo_t  frame_offset 
)

Saves a frame of data to an inputFile.

Returns
Returns IUF_E_OK when succesful or <0 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe label of the patternList
frameThe frame of data
frame_offsetThe offset in the datablock

◆ iufInputFileGetAcquisition()

iua_t iufInputFileGetAcquisition ( iuif_t  inputFile)

Gets the IufAcquisition object from an inputFile.

Returns
Returns the requested IufAcquisition or NULL in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetFrameList()

iufl_t iufInputFileGetFrameList ( iuif_t  inputFile)

Gets the IufFrameList object from an inputFile.

Returns
Returns the requested IufFrameList or IUFL_INVALID in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetNumChannels()

int iufInputFileGetNumChannels ( iuif_t  inputFile,
char *  label 
)

Gets the number of channels for the patternList type label.

Returns
Returns the number of channels or -1 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelthe patternList type

◆ iufInputFileGetNumFrames()

int iufInputFileGetNumFrames ( iuif_t  inputFile)

Returns the number of frames an inputFile has.

Returns
Returns the number of frames or 0 if there are no frames, or -1 in case of an invalid argument.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetNumResponses()

int iufInputFileGetNumResponses ( iuif_t  inputFile,
char *  label 
)

Gets the number of responses for the patternList type label.

Returns
Returns the number of responses (numPatterns) or -1 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelthe patternList type

◆ iufInputFileGetPatternListDict()

iupald_t iufInputFileGetPatternListDict ( iuif_t  inputFile)

Gets the IufPatternListDict object from an inputFile.

Returns
Returns the requested IufPatternListDict or NULL in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetPulseDict()

iupd_t iufInputFileGetPulseDict ( iuif_t  inputFile)

Gets the IufPulseDict object from an inputFile.

Returns
Returns the requested IufPulseDict or IUPD_INVALID in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetReadSpace()

hid_t iufInputFileGetReadSpace ( iuif_t  inputFile,
char *  label 
)

◆ iufInputFileGetReceiveChannelMapDict()

iurcmd_t iufInputFileGetReceiveChannelMapDict ( iuif_t  inputFile)

Gets the IufReceiveChannelMapDict object from an inputFile.

Returns
Returns the requested IufReceiveChannelMapDict or IURCMD_INVALID in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetReceiveSettingsDict()

iursd_t iufInputFileGetReceiveSettingsDict ( iuif_t  inputFile)

Gets the IufReceiveSettingsDict object from an inputFile.

Returns
Returns the requested IufReceiveSettingsDict or NULL in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetSamplesPerLine()

int iufInputFileGetSamplesPerLine ( iuif_t  inputFile,
char *  label 
)

Gets the number of samples per line for this label.

Returns
Returns the number of channels or -1 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelthe patternList type

◆ iufInputFileGetSourceDict()

iusd_t iufInputFileGetSourceDict ( iuif_t  inputFile)

Gets the IufSourceDict object from an inputFile.

Returns
Returns the requested IufSourceDict or IUFD_INVALID in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetTransducer()

iut_t iufInputFileGetTransducer ( iuif_t  inputFile)

Gets the IufTransducer object from an inputFile.

Returns
Returns the requested IufTransducer or NULL in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileGetTransmitApodizationDict()

iutad_t iufInputFileGetTransmitApodizationDict ( iuif_t  inputFile)

Gets the IufTransmitApodizationDict object from an inputFile.

Returns
Returns the requested IufTransmitApodizationDict or NULL in case of an error.
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileInstanceCreate()

iuifi_t iufInputFileInstanceCreate ( void  )

◆ iufInputFileInstanceDelete()

int iufInputFileInstanceDelete ( iuifi_t  instance)

◆ iufInputFileInstanceLoad()

void* iufInputFileInstanceLoad ( hid_t  handle)

◆ iufInputFileNodeLoad()

iuif_t iufInputFileNodeLoad ( const char *  pFilename)

Load an inputFile instance from a file.

Returns
Returns an input file instance or IUIF_INVALID the file could not be read.
Parameters
pFilenameThe filename of the inputFile

◆ iufInputFileNodeSave()

int iufInputFileNodeSave ( iuif_t  inputFile)

Save (serialize) the inputFile instance to file.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error
Parameters
inputFileThe IufInputFile of interest

◆ iufInputFileResponseCreate()

iud_t iufInputFileResponseCreate ( iuif_t  inputFile,
char *  label 
)

Creates a datablock for a response (numSamplesPerLine * numChannels) for the acquisition with the name label.

Returns
Returns an allocated memory block of a "label"-response or IUD_INVALID in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe acquisition type

◆ iufInputFileResponseLoad()

int iufInputFileResponseLoad ( iuif_t  inputFile,
char *  label,
iud_t  response,
iuo_t  response_offset 
)

Loads a single response of data from an inputFile.

Returns
Returns IUF_E_OK when succesful or <0 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe label of the patternList
responseThe response data to load
response_offsetThe offset in the datablock

◆ iufInputFileResponseSave()

int iufInputFileResponseSave ( iuif_t  inputFile,
char *  label,
iud_t  response,
iuo_t  response_offset 
)

Saves a channel of data to an inputFile.

Returns
Returns IUF_E_OK when succesful or <0 in case of an error.
Parameters
inputFileThe IufInputFile of interest
labelThe label of the patternList
responsethe response data to save
response_offsetThe offset in the datablock

◆ iufInputFileSaveInstance()

int iufInputFileSaveInstance ( hid_t  handle,
iuifi_t  instanceData 
)

◆ iufInputFileSetAcquisition()

int iufInputFileSetAcquisition ( iuif_t  inputFile,
iua_t  acquisition 
)

Sets the acquisition info of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
acquisitionThe IufAcquisition to set

◆ iufInputFileSetFilename()

int iufInputFileSetFilename ( iuif_t  inputFile,
char *  fileName 
)

◆ iufInputFileSetFrameList()

int iufInputFileSetFrameList ( iuif_t  inputFile,
iufl_t  frameList 
)

Sets the frameList of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
frameListThe IufFrameList to set

◆ iufInputFileSetPatternListDict()

int iufInputFileSetPatternListDict ( iuif_t  inputFile,
iupald_t  patternListDict 
)

Sets the patternListDict of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
patternListDictThe IufPatternListDict to set

◆ iufInputFileSetPulseDict()

int iufInputFileSetPulseDict ( iuif_t  inputFile,
iupd_t  pulseDict 
)

Sets the pulseDict of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
pulseDictThe IufPulseDict to set

◆ iufInputFileSetReceiveChannelMapDict()

int iufInputFileSetReceiveChannelMapDict ( iuif_t  inputFile,
iurcmd_t  receiveChannelMapDict 
)

Sets the receiveChannelMap of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
receiveChannelMapDictThe IufReceiveChannelMapDict to set

◆ iufInputFileSetReceiveSettingsDict()

int iufInputFileSetReceiveSettingsDict ( iuif_t  inputFile,
iursd_t  receiveSettingsDict 
)

Sets the receiveSettingsDict of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
receiveSettingsDictThe IufTransmitApodizationDict to set

◆ iufInputFileSetSourceDict()

int iufInputFileSetSourceDict ( iuif_t  inputFile,
iusd_t  sourceDict 
)

Sets the sourceDict of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
sourceDictThe IufSourceDict to set

◆ iufInputFileSetTransducer()

int iufInputFileSetTransducer ( iuif_t  inputFile,
iut_t  transducer 
)

Sets the transducer of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
transducerThe IufTransducer to set

◆ iufInputFileSetTransmitApodizationDict()

int iufInputFileSetTransmitApodizationDict ( iuif_t  inputFile,
iutad_t  transmitApodizationDict 
)

Sets the transmitApodizationDict of an inputFile.

Returns
Returns IUF_E_OK when succesful or IUF_ERR_VALUE in case of an error.
Parameters
inputFileThe IufInputFile of interest
transmitApodizationDictThe IufTransmitApodizationDict to set