SetSize, SetIndex Python

There’s a way to set the size and the index of an image in python? Because commands


report this error: AttributeError: 'itkImageF3' object has no attribute 'SetSize'

Size and Index are properties or a Region. Image has three regions: Requested, Buffered and LargestPossible. Setting an Index directly is supported, but size cannot be changed this way. Only perhaps reducing the size along the slowest-changing axis will not lead to disastrous effect. It looks like you want to use ExtractImageFilter.