pytomography.io.dicom#

Note: This module is still being built and is not yet finished.

Module Contents#

Functions#

get_radii_and_angles(ds)

Gets projections with corresponding radii and angles corresponding to projection data from a DICOM dataset.

dicom_projections_to_data(file)

Obtains ObjectMeta, ImageMeta, and projections from a .dcm file.

dicom_MEW_to_data(file[, type])

get_HU2mu_coefficients(ds)

HU_to_mu(HU, a1, b1, a2, b2)

get_affine_spect(ds)

get_affine_CT(ds, max_z)

dicom_CT_to_data(files_CT[, file_NM])

get_SPECT_recon_algorithm_dicom(projections_file[, ...])

pytomography.io.dicom.get_radii_and_angles(ds)[source]#

Gets projections with corresponding radii and angles corresponding to projection data from a DICOM dataset.

Parameters:

ds (Dataset) – pydicom dataset object.

Returns:

Required image data for reconstruction.

Return type:

(torch.tensor[1,Ltheta, Lr, Lz], np.array, np.array)

pytomography.io.dicom.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.dicom.dicom_MEW_to_data(file, type='DEW')[source]#
pytomography.io.dicom.get_HU2mu_coefficients(ds)[source]#
pytomography.io.dicom.HU_to_mu(HU, a1, b1, a2, b2)[source]#
pytomography.io.dicom.get_affine_spect(ds)[source]#
pytomography.io.dicom.get_affine_CT(ds, max_z)[source]#
pytomography.io.dicom.dicom_CT_to_data(files_CT, file_NM=None)[source]#
pytomography.io.dicom.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