Skip to main content

Tools for reading DICOM registration file along with two SimpleITK Images (probably from DICOM) and resampling the moving image. Major help from Bastien Rigaud in creation.

Project description

This code provides functionality for registering a fixed and moving image based on the Dicom Registration file

Installation guide

pip install RegisteringImages

Highly recommend to also have DicomRTTool installed

pip install DicomRTTool

Example:

from DicomRTTool import DicomReaderWriter
from RegisterImages.WithDicomReg import register_images_with_dicom_reg, pydicom, sitk

fixed_reader = DicomReaderWriter()
moving_reader = DicomReaderWriter()

registration_file = 'some_path_to_registration'
dicom_registration = pydicom.read_file(registration_file)

fixed_path = 'some_path_to_fixed_image'
moving_path = 'some_path_to_moving_image'

fixed_reader.down_folder(primary_path)
moving_reader.down_folder(secondary_path)
fixed_image = sitk.Cast(primary_reader.dicom_handle, sitk.sitkFloat32)
moving_image = sitk.Cast(secondary_reader.dicom_handle, sitk.sitkFloat32)

resampled_moving = register_images_with_reg(fixed_image=fixed_image, moving_image=moving_image, dicom_registration=dicom_registration)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

RegisteringImages-0.1.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

RegisteringImages-0.1.3-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file RegisteringImages-0.1.3.tar.gz.

File metadata

  • Download URL: RegisteringImages-0.1.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.0

File hashes

Hashes for RegisteringImages-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8bb622caf69d5749dc30680618abbdfd3348ee780e9a1fe7a182747d95dc482e
MD5 3cf7bd29740d756a2a2f36e3517dc3c7
BLAKE2b-256 cba602043761cec8fd7aba9627a83c2bb0eb1b4bb431315c7361a895bc7b98f8

See more details on using hashes here.

File details

Details for the file RegisteringImages-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for RegisteringImages-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8ad20b80c5ef26053d052e877c8667e45d8299bc22d5e2f96ddc93a82341bac3
MD5 6ae1699e5e19ebdac2ff0462323bc0f1
BLAKE2b-256 b4f109f4eccec7193f558a1cf39037e8818ee881888d483bcace135a6f92a9ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page