3.1.2.14. opengate.helpers_image¶
3.1.2.14.1. Module Contents¶
3.1.2.14.1.1. Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The two images are considered in the same physical space (coordinate system). |
|
The two images are considered in the same GATE physical space (coordinate system), so according to the |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compute the three CDF (Cumulative Density Function) for the given image |
|
|
|
The inputs are filenames of several images containing projections for a given spect head |
- opengate.helpers_image.create_3d_image(size, spacing, pixel_type='float', allocate=True, fill_value=0)[source]¶
- opengate.helpers_image.get_translation_between_images_center(img_name1, img_name2)[source]¶
The two images are considered in the same physical space (coordinate system). This function computes the translation between their centers. Warning, the ITK image origin consider the center of the first voxel, we thus consider half a pixel shift for the center.
- opengate.helpers_image.get_origin_wrt_images_g4_position(img_info1, img_info2, translation)[source]¶
The two images are considered in the same GATE physical space (coordinate system), so according to the centers of both images (+translation). This function computes the origin for the second image such as the two images will be in the same physical space of the first image. Warning, the ITK image origin considers the center of the first voxel, we thus consider half a pixel shift for the center.
- opengate.helpers_image.get_translation_from_iso_center(img_info, rot, iso_center, centered)[source]¶
- opengate.helpers_image.attach_image_to_physical_volume(phys_vol_name, image, initial_translation=None, initial_rotation=Rotation.identity())[source]¶
- opengate.helpers_image.create_image_with_volume_extent(sim, vol_name, spacing=[1, 1, 1], margin=0)[source]¶
- opengate.helpers_image.compute_image_3D_CDF(image)[source]¶
Compute the three CDF (Cumulative Density Function) for the given image Warning; numpy order is ZYX
- Parameters:
image – itk image
- opengate.helpers_image.split_spect_projections(input_filenames, nb_ene)[source]¶
The inputs are filenames of several images containing projections for a given spect head Each image is composed of nb_ene energy windows and XX angles. The number of angles is found by looking at the number of slices.
The function computes nb_ene itk image with all angles and all heads merged into a list of projections stored as a 3D image, to make it easy to reconstruct with RTK.