cornucopia.psf
This module contains transforms that modify the resolution and/or point spread function of an image.
SmoothTransform
Bases: FinalTransform
Apply Gaussian smoothing
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fwhm
|
float
|
Full-width at half-maximum of the Gaussian kernel |
1
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
[(list | dict) of] {'input', 'output'}
|
Which tensors to return. |
RandomSmoothTransform
Bases: RandomizedTransform
Apply Gaussian smoothing with random FWHM
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fwhm
|
Sampler | float
|
Sampler or upper bound for the full-width at half-maximum |
2
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
[(list | dict) of] {'input', 'output'}
|
Which tensors to return. |
shared |
(channels, tensors, channels + tensors, '')
|
Use the same fwhm for all channels/tensors |
LowResSliceFinalTransform
LowResSliceTransform
Bases: NonFinalTransform
Model a low-resolution slice direction, with Gaussian profile
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
float
|
Resolution of the slice dimension, in terms of high-res voxels. This is the distance between the centers of two consecutive slices. |
3
|
thickness
|
float in 0..1
|
Slice thickness, as a proportion of resolution. This is how much data is averaged into one low-resolution slice. |
0.8
|
axis
|
int
|
Slice axis |
-1
|
noise
|
Transform
|
A transform that adds noise in the low-resolution space |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
[(list | dict) of] {'input', 'lowres', 'output'}
|
Which tensors to return. |
RandomLowResSliceTransform
RandomLowResSliceTransform(resolution=3, thickness=0.1, axis=None, noise=None, *, shared=False, **kwargs)
Bases: RandomizedTransform
Random low-resolution slice direction, with Gaussian profile
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
Sampler | float
|
Distribution from which to sample the resolution.
If a |
3
|
thickness
|
Sampler | float in 0..1
|
Distribution from which to sample the resolution.
If a |
0.1
|
axis
|
Sampler | int | None
|
Slice axis. If None, select one randomly. |
None
|
noise
|
Transform | None
|
A transform that adds noise in the low-resolution space |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
[(list | dict) of] {'input', 'lowres', 'output'}
|
Which tensors to return. |
shared |
(channels, tensors, channels + tensors, '')
|
Use the same resolution for all channels/tensors |
LowResFinalTransform
Bases: FinalTransform
Model a lower-resolution image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
[list of] float
|
Resolution of the low-res image, in terms of high-res voxels. |
required |
noise
|
Transform | None
|
A transform that adds noise in the low-resolution space |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
[(list | dict) of] {'input', 'lowres', 'output'}
|
Which tensors to return. |
LowResTransform
Bases: NonFinalTransform
Model a lower-resolution image
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
[list of] float
|
Resolution of the low-res image, in terms of high-res voxels |
2
|
noise
|
Transform | None
|
A transform that adds noise in the low-resolution space |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
[(list | dict) of] {'input', 'lowres', 'output'}
|
Which tensors to return. |
RandomLowResTransform
Bases: RandomizedTransform
Random lower-resolution image
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolution
|
Sampler | float
|
Distribution from which to sample the resolution.
If a |
2
|
noise
|
Transform | None
|
A transform that adds noise in the low-resolution space |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
[(list | dict) of] {'input', 'lowres', 'output'}
|
Which tensors to return. |
shared |
(channels, tensors, channels + tensors, '')
|
Use the same resolution for all channels/tensors |