adapters
This package contains implementations of custom adapters that enable the conversion of certain commonly used photoacoustic data formats into the IPASC format.
You can use these as a reference when attempting to define your own adapters.
- class NrrdFileConverter(nrrd_file_path)[source]
Bases:
BaseAdapter
This converter assumes a linear transducer with 128 elements and an element pitch of 0.3mm. It assumes that the NRRD file metadata contains a ‘sizes’, ‘type’ and ‘space directions’ field.
- generate_binary_data() ndarray [source]
The binary data is the raw time series data. It is internally stored as an N-dimensional numpy array. The binary data must be formatted the following way:
[detectors, samples, wavelengths, measurements]
- Returns:
A numpy array containing the binary data
- Return type:
np.ndarray
- generate_device_meta_data() dict [source]
Must be implemented to define a digital twin of the photoacoustic imaging device. This method can be implemented using the DeviceMetaDataCreator.
- Returns:
A dictionary containing all key-value pair necessary to describe a digital twin of a photoacoustic device.
- Return type: