pytomography.io.shared.interfile
#
Module Contents#
Functions#
|
Finds the first entry in an Interfile with the string |
|
Opens attenuation data from SIMIND output |
- pytomography.io.shared.interfile.get_header_value(list_of_attributes, header, dtype=np.float32, split_substr=':=', split_idx=-1, return_all=False)[source]#
Finds the first entry in an Interfile with the string
header
- Parameters:
list_of_attributes (list[str]) – Simind data file, as a list of lines.
header (str) – The header looked for
dtype (type, optional) – The data type to be returned corresponding to the value of the header. Defaults to np.float32.
- Returns:
The value corresponding to the header (header).
- Return type:
float|str|int
- pytomography.io.shared.interfile.get_attenuation_map_interfile(headerfile)[source]#
Opens attenuation data from SIMIND output
- Parameters:
headerfile (str) – Path to header file
- Returns:
Tensor containing attenuation map required for attenuation correction in SPECT/PET imaging.
- Return type:
torch.Tensor[batch_size, Lx, Ly, Lz]