pytomography.io
#
Submodules#
Package Contents#
Functions#
|
Opens attenuation data from SIMIND output |
|
Obtains ObjectMeta, ImageMeta, and projections from a SIMIND header file. |
|
Opens multiple projection files corresponding to the primary, lower scatter, and upper scatter windows |
|
|
Obtains ObjectMeta, ImageMeta, and projections from a .dcm file. |
|
|
|
|
|
|
- pytomography.io.simind_CT_to_data(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.simind_projections_to_data(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.simind_MEW_to_data(headerfiles, distance='cm')[source]#
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.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
- pytomography.io.dicom_projections_to_data(file)[source]#
Obtains ObjectMeta, ImageMeta, and projections from a .dcm file.
- Parameters:
file (str) – Path to the .dcm file
- Returns:
Required information for reconstruction in PyTomography.
- Return type:
(ObjectMeta, ImageMeta, torch.Tensor[1, Ltheta, Lr, Lz])
- pytomography.io.get_SPECT_recon_algorithm_dicom(projections_file, atteunation_files=None, use_psf=False, scatter_type=None, prior=None, recon_algorithm_class=OSEMOSL, object_initial=None)[source]#
- Parameters:
projections_file (str) –
atteunation_files (Sequence[str]) –
use_psf (bool) –
scatter_type (str | None) –
prior (pytomography.priors.Prior) –
recon_algorithm_class (torch.nn.Module) –
object_initial (torch.Tensor | None) –
- Return type:
torch.nn.Module