Project

General

Profile

Actions

Saving Transform Information to DICOM » History » Revision 3

« Previous | Revision 3/4 (diff) | Next »
Peter Qian, 31/08/2021 03:23 PM


Saving Transform Information to DICOM

Documentation to describe how the Transform Information is saved into a DICOM file.

After a fixed and moving image are successfully co-registered, the function

def register_images(image_1, image_2):

Will produce the moving image(translated) and SITK.CompositeTransform object. The SITK.CompositeTransform will contain a number of transforms in a queue.

As of the time of development, it can be only observed that Euler3DTransform and Versor3DRigidTransform transform objects are stored into the SITK.CompositeTransform object.

def create_fused_model(old_images, new_image)

The function below calls for all the transforms in the SITK.CompositeTransform object and reduces all the transform objects into a singular transform object. This singular transform object is constructed in a SITK.AffineTransform. One thing to mention is that the function only assumes that there is only an Euler3DTransform and Versor3DRigidTransform in the SITK.CompositeTransform. Information regarding to SITK Spatial Transformations.

def convert_composite_to_affine_transform(composite_transform)

To construct a matrix that complies with DICOM standards, the 3x3 matrix within the SITK.AffineTransform object is calculated to a 4x4 matrix with the function. (It has been checked that with the retrieval of the matrix and only collecting elements up to the 3rd column and row. The last column represents the translation (or offset) vector.

def convert_combined_affine_to_matrix(combined_affine)

The 4x4 is then written to a transform.dcm via the function, adhering to DICOM standards. The Spatial Registration Object is constructed and implemented by following the tree list pattern as shown in here.

def write_transform_to_dcm(affine_matrix)

Updated by Peter Qian over 3 years ago · 3 revisions