Apply transformation change the image size

Hi everyone,

I’m using the 3D Slicer version 4.13 and when I apply a b-spline transformation to an image it changes the original size.

Original size = 512 x 512 x 140

After apply the transformation:

    transformLogic = slicer.modules.transforms.logic()

The final image size becomes = 513 x 513 x 140

I don’t want to change the original image size. Is it possible to maintain the original image size after transformation without cropping?

The transformation is saved in .txt file with the following parameters:


I would appreciate some help. Thanks.

Deformable transforms can translate volumes and make parts of the volume bulge out, therefore in general you don’t want the resampled volume to have the same geometry (origin, spacing, axis directions, extents) as the non-transformed volume. Slicer automatically expands the volume extents to ensure that the complete warped volume is preserved.

If you want to enforce a particular image geometry then you can use a resampling module (for example, “Resample scalar/vector/dwi volume”) to create a transformed volume resampled to a chosen reference volume. In your case, the “Reference volume” will be your input volume.

1 Like

Thank you for your answer