cornucopia.contrast
This module contains transforms that operate on image contrasts.
ContrastMixtureFinalTransform
Bases: FinalTransform
Classwise shift and rescaling.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
(K, *spatial) tensor
|
Probability that each voxel belongs to a given class. |
required |
mu0
|
(K, C) tensor
|
Original means for each class. |
required |
sigma0
|
(K, C, C) tensor
|
Original covariances for each class. |
required |
mu
|
(K, C) tensor
|
New means for each class. |
required |
sigma
|
(K, C, C) tensor
|
New covariances for each class. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
See |
|
append |
See |
|
prefix |
See |
|
include |
See |
|
exclude |
See |
|
consume |
See |
ContrastMixtureTransform
Bases: NonFinalTransform
Find intensity modes using a GMM and change their means and covariances.
Reference
Meyer, M.I., de la Rosa, E., Pedrosa de Barros, N., Paolella, R., Van Leemput, K. and Sima, D.M., 2021. A contrast augmentation approach to improve multi-scanner generalization in MRI. Frontiers in Neuroscience, 15, p.708196.
@article{meyer2021,
title = {A contrast augmentation approach to improve multi-scanner generalization in MRI},
author = {Meyer, Maria Ines and de la Rosa, Ezequiel and Pedrosa de Barros, Nuno and Paolella, Roberto and Van Leemput, Koen and Sima, Diana M},
journal = {Frontiers in Neuroscience},
volume = {15},
pages = {708196},
year = {2021},
publisher = {Frontiers Media SA},
url = {https://www.frontiersin.org/articles/10.3389/fnins.2021.708196}
}
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nk
|
int
|
Number of classes |
16
|
keep_background
|
bool
|
Do not change background mean/cov. The background class is the class with minimum mean value. |
True
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
shared |
bool
|
See |
returns |
See |
|
append |
See |
|
prefix |
See |
|
include |
See |
|
exclude |
See |
|
consume |
See |
ContrastLookupFinalTransform
Bases: FinalTransform
Binwise intensity shift.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edges
|
(K+1,) tensor
|
The limits of each input bin. |
required |
mu
|
(K,) tensor
|
The new mean value for each bin. |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
returns |
See |
|
append |
See |
|
prefix |
See |
|
include |
See |
|
exclude |
See |
|
consume |
See |
ContrastLookupTransform
Bases: NonFinalTransform
Segment intensities into equidistant bins and change their mean value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nk
|
int
|
Number of classes |
16
|
keep_background
|
bool
|
Do not change background mean/cov. The background class is the class with minimum mean value. |
True
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
shared |
See |
|
returns |
See |
|
append |
See |
|
prefix |
See |
|
include |
See |
|
exclude |
See |
|
consume |
See |