pytomography.io.simind
#
Module Contents#
Functions#
|
Finds the first entry in a SIMIND Interfile output corresponding to the header (header). |
|
Obtains ObjectMeta, ImageMeta, and projections from a SIMIND header file. |
|
Opens multiple projection files corresponding to the primary, lower scatter, and upper scatter windows |
|
Opens attenuation data from SIMIND output |
Attributes#
- pytomography.io.simind.relation_dict#
- pytomography.io.simind.find_first_entry_containing_header(list_of_attributes, header, dtype=np.float32)#
Finds the first entry in a SIMIND Interfile output corresponding to the header (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.simind.simind_projections_to_data(headerfile, distance='cm')#
Obtains ObjectMeta, ImageMeta, and projections from a SIMIND header file.
- Parameters:
headerfile (str) – Path to the header file
distance (str, optional) – The units of measurements in the SIMIND file (this is required as input, since SIMIND uses mm/cm but doesn’t specify). Defaults to ‘cm’.
- Returns:
Required information for reconstruction in PyTomography.
- Return type:
(ObjectMeta, ImageMeta, torch.Tensor[1, Ltheta, Lr, Lz])
- pytomography.io.simind.simind_MEW_to_data(headerfiles, distance='cm')#
Opens multiple projection files corresponding to the primary, lower scatter, and upper scatter windows
- Parameters:
headerfiles (list[str]) – List of file paths to required files. Must be in order of: 1. Primary, 2. Lower Scatter, 3. Upper scatter
distance (str, optional) – The units of measurements in the SIMIND file (this is required as input, since SIMIND uses mm/cm but doesn’t specify). Defaults to ‘cm’.
- Returns:
Required information for reconstruction in PyTomography. First returned tensor contains primary data, and second returned tensor returns estimated scatter using the triple energy window method.
- Return type:
(ObjectMeta, ImageMeta, torch.Tensor[1, Ltheta, Lr, Lz], torch.Tensor[1, Ltheta, Lr, Lz])
- pytomography.io.simind.simind_CT_to_data(headerfile)#
Opens attenuation data from SIMIND output
- Parameters:
headerfile (str) – Path to header file
- Returns:
Tensor containing CT data.
- Return type:
torch.tensor[Lx,Ly,Lz]