pytomography.io.SPECT.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. |
|
Obtains a triple energy window scatter estimate from corresponding photopeak, lower, and upper energy windows. |
|
Opens attenuation data from SIMIND output |
|
Attributes#
- pytomography.io.SPECT.simind.find_first_entry_containing_header(list_of_attributes, header, dtype=np.float32)[source]#
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.SPECT.simind.get_projections(headerfile, distance='cm')[source]#
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.SPECT.simind.get_scatter_from_TEW(headerfile_peak, headerfile_lower, headerfile_upper, distance='cm')[source]#
Obtains a triple energy window scatter estimate from corresponding photopeak, lower, and upper energy windows.
- Parameters:
headerfile_peak (str) – Headerfile corresponding to the photopeak
headerfile_lower (str) – Headerfile corresponding to the lower energy window
headerfile_upper (str) – Headerfile corresponding to the upper energy window
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:
Estimated scatter from the triple energy window.
- Return type:
torch.Tensor[1, Ltheta, Lr, Lz]
- pytomography.io.SPECT.simind.get_atteuation_map(headerfile)[source]#
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]
- pytomography.io.SPECT.simind.get_SPECT_recon_algorithm_simind(projections_header, scatter_headers=None, CT_header=None, psf_meta=None, prior=None, object_initial=None, recon_algorithm_class=OSEMOSL)[source]#
- Parameters:
projections_header (str) –
scatter_headers (Sequence[str] | None) –
CT_header (str) –
psf_meta (pytomography.metadata.PSFMeta) –
prior (pytomography.priors.Prior) –
object_initial (torch.Tensor | None) –
recon_algorithm_class (torch.nn.Module) –
- Return type:
torch.nn.Module