Tools for reading DICOM registration file along with two SimpleITK Images (probably from DICOM) and resampling the moving image
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 RegisteringImages
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
Built Distribution
Close
Hashes for RegisteringImages-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d46990b10f34e7c0a82ba01cbe8d109cae69ff5e974da21db89d94f8c4e5356b |
|
MD5 | 53355d1cd47f6d0fb4082da10ee8a485 |
|
BLAKE2b-256 | 43e87fa105eb069e3c217d88e0d6b56d75a58d2919da92acce495b1d97deac1c |