Did I find the right examples for you? yes no

# transforms.affine_utils.apply_affine

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

```# Local imports
from .volume_data import VolumeData
from ..transforms.affine_utils import apply_affine, from_matrix_vector

```
```            affine4d[:3, :3] = affine3d
x, y, z = self.get_world_coords()
x, y, z = apply_affine(x, y, z, np.linalg.inv(affine4d))
xmin = x.min()
ymin = y.min()
```
```                % shape )
x, y, z = np.indices(shape)
x, y, z = apply_affine(x, y, z, affine)
values = self.values_in_world(x, y, z)
# We import late to avoid circular import
```

```# Local imports
from .volume_data import VolumeData
from ..transforms.affine_utils import apply_affine, from_matrix_vector

```
```            affine4d[:3, :3] = affine3d
x, y, z = self.get_world_coords()
x, y, z = apply_affine(x, y, z, np.linalg.inv(affine4d))
xmin = x.min()
ymin = y.min()
```
```                % shape )
x, y, z = np.indices(shape)
x, y, z = apply_affine(x, y, z, affine)
values = self.values_in_world(x, y, z)
# We import late to avoid circular import
```

```from .transforms.transform import Transform, CompositionError
from .transforms.affine_transform import AffineTransform
from .transforms.affine_utils import apply_affine

from .converters import as_volume_img, save
```

```from .transforms.transform import Transform, CompositionError