public class DataSynthesizer extends java.lang.Object implements DataSource
Constructor and Description |
---|
DataSynthesizer(ModelPDF pdf,
DW_Scheme ip,
double s)
Constructor requires the
DW_Scheme , the test function and the
signal to noise level. |
DataSynthesizer(ModelPDF pdf,
DW_Scheme ip,
double s,
int numVox)
Constructor includes the number of voxels in the synthetic data source.
|
DataSynthesizer(ModelPDF pdf,
DW_Scheme ip,
double s,
int numVox,
int seed)
Constructor includes the number of voxels in the synthetic data source.
|
DataSynthesizer(ModelPDF pdf,
DW_Scheme ip,
double s,
int numVox,
java.util.Random ran)
Constructor includes the number of voxels in the synthetic data
source and the actual
Random object to use. |
Modifier and Type | Method and Description |
---|---|
static double[] |
addGaussianNoise(double[] samples,
double sigma,
java.util.Random r)
Adds Gaussian noise to each measurement.
|
static double[] |
addNoise(double[] samples,
double sigma,
java.util.Random r)
Adds isotropic complex Gaussian noise to each measurement and takes the
modulus resulting in Rician noise.
|
boolean |
more()
Tests whether there are unprocessed voxels in the data source.
|
double[] |
nextVoxel()
Returns the data in the next voxel.
|
public DataSynthesizer(ModelPDF pdf, DW_Scheme ip, double s)
DW_Scheme
, the test function and the
signal to noise level.pdf
- The test function to sample.ip
- The DW_Scheme
object with the details of the scanner
sequence to emulate.s
- The signal to noise ratio with q=0.public DataSynthesizer(ModelPDF pdf, DW_Scheme ip, double s, int numVox)
pdf
- The test function to sample.ip
- The DW_Scheme
object with the details of the scanner
sequence to emulate.s
- The signal to noise ratio with q=0.numVox
- The number of voxels to provide.public DataSynthesizer(ModelPDF pdf, DW_Scheme ip, double s, int numVox, int seed)
pdf
- The test function to sample.ip
- The DW_Scheme
object with the details of the scanner
sequence to emulate.s
- The signal to noise ratio with q=0.numVox
- The number of voxels to provide.seed
- Random number generator seed.public DataSynthesizer(ModelPDF pdf, DW_Scheme ip, double s, int numVox, java.util.Random ran)
Random
object to use.pdf
- The test function to sample.ip
- The DW_Scheme
object with the details of the
scanner sequence to emulate.s
- The signal to noise ratio with q=0.numVox
- The number of voxels to provide.ran
- the Random number generator.public double[] nextVoxel() throws DataSourceException
DataSource
nextVoxel
in interface DataSource
DataSourceException
public boolean more()
DataSource
more
in interface DataSource
public static double[] addNoise(double[] samples, double sigma, java.util.Random r)
samples
- The measurements to add noise to.sigma
- The standard deviation of the real and imaginary components of
the noise.r
- The random number generator to use to synthesize the noise.public static double[] addGaussianNoise(double[] samples, double sigma, java.util.Random r)
samples
- The measurements to add noise to.sigma
- The standard deviation of the noise.r
- The random number generator to use to synthesize the noise.