ImageDev

RandomGaussianImage3d

Creates a new three-dimensional image with random values that have a Gaussian distribution.

Access to parameter description

RandomGaussianImage3d creates an image with random values that follow a Gaussian distribution of a given mean and standard deviation.
The output image intensity values are generally included in the range $[Mean-4.5\times\sigma ~..~ Mean+4.5\times\sigma]$.
Where $Mean$ and the standard deviation $\sigma$ are input parameters of the algorithm.

The type of the output image is set by an enumerate as detailed in the Data Type Management section.

See also
See related example

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > randomGaussianImage3d( RandomGaussianImage3d::OutputType outputType, int32_t imageSizeX, int32_t imageSizeY, int32_t imageSizeZ, double mean, double standardDeviation, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype.
random_gaussian_image_3d( output_type = RandomGaussianImage3d.OutputType.UNSIGNED_INTEGER_8_BIT,
                          image_size_x = 1024,
                          image_size_y = 1024,
                          image_size_z = 256,
                          mean = 80,
                          standard_deviation = 20,
                          output_image = None )
This function returns outputImage.
// Function prototype.
public static IOLink.ImageView
RandomGaussianImage3d( RandomGaussianImage3d.OutputType outputType = ImageDev.RandomGaussianImage3d.OutputType.UNSIGNED_INTEGER_8_BIT,
                       Int32 imageSizeX = 1024,
                       Int32 imageSizeY = 1024,
                       Int32 imageSizeZ = 256,
                       double mean = 80,
                       double standardDeviation = 20,
                       IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Class Name RandomGaussianImage3d

Parameter Name Description Type Supported Values Default Value
input
imageSizeX
The X size in voxels of the output image. Int32 >=1 1024
input
imageSizeY
The Y size in voxels of the output image. Int32 >=1 1024
input
imageSizeZ
The Z size in voxels of the output image. Int32 >=1 256
input
outputType
The output image data type.
UNSIGNED_INTEGER_8_BIT The output image data type is 1 byte depth. Its possible intensities are unsigned integer from 0 to 255.
SIGNED_INTEGER_8_BIT The output image data type is 1 byte depth. Its possible intensities are signed integer from -128 to 127.
SIGNED_INTEGER_16_BIT The output image data type is 2 bytes depth. Its possible intensities are signed integer from -32,768 to 32,767.
UNSIGNED_INTEGER_16_BIT The output image data type is 2 bytes depth. Its possible intensities are unsigned integer from 0 to 65,535.
LABEL_16_BIT The output image data type is 2 bytes depth and interpretation is label. Its possible intensities are unsigned integer from 0 to 65,535.
BINARY The output image data type is 2 bytes depth and interpretation is binary. Its possible intensities are unsigned integer from 0 to 1.
SIGNED_INTEGER_32_BIT The output image data type is 4 bytes depth. Its possible intensities are signed integer from -2,147,483,648 to 2,147,483,647.
FLOAT_32_BIT The output image data type is 4 bytes depth. Its possible intensities are unsigned floating-point from -3.402823E38 to 3.402823E38.
Enumeration UNSIGNED_INTEGER_8_BIT
input
mean
The mean intensity of the output distribution. Float64 Any value 80
input
standardDeviation
The standard deviation. Float64 >0 20
output
outputImage
The output image. Image nullptr

Object Examples


RandomGaussianImage3d randomGaussianImage3dAlgo;
randomGaussianImage3dAlgo.setOutputType( RandomGaussianImage3d::OutputType::UNSIGNED_INTEGER_8_BIT );
randomGaussianImage3dAlgo.setImageSizeX( 128 );
randomGaussianImage3dAlgo.setImageSizeY( 128 );
randomGaussianImage3dAlgo.setImageSizeZ( 128 );
randomGaussianImage3dAlgo.setMean( 80.0 );
randomGaussianImage3dAlgo.setStandardDeviation( 20.0 );
randomGaussianImage3dAlgo.execute();

std::cout << "outputImage:" << randomGaussianImage3dAlgo.outputImage()->toString();

random_gaussian_image_3d_algo = imagedev.RandomGaussianImage3d()
random_gaussian_image_3d_algo.output_type = imagedev.RandomGaussianImage3d.UNSIGNED_INTEGER_8_BIT
random_gaussian_image_3d_algo.image_size_x = 128
random_gaussian_image_3d_algo.image_size_y = 128
random_gaussian_image_3d_algo.image_size_z = 128
random_gaussian_image_3d_algo.mean = 80.0
random_gaussian_image_3d_algo.standard_deviation = 20.0
random_gaussian_image_3d_algo.execute()

print( "output_image:", str( random_gaussian_image_3d_algo.output_image ) )

RandomGaussianImage3d randomGaussianImage3dAlgo = new RandomGaussianImage3d
{
    outputType = RandomGaussianImage3d.OutputType.UNSIGNED_INTEGER_8_BIT,
    imageSizeX = 128,
    imageSizeY = 128,
    imageSizeZ = 128,
    mean = 80.0,
    standardDeviation = 20.0
};
randomGaussianImage3dAlgo.Execute();

Console.WriteLine( "outputImage:" + randomGaussianImage3dAlgo.outputImage.ToString() );

Function Examples


auto result = randomGaussianImage3d( RandomGaussianImage3d::OutputType::UNSIGNED_INTEGER_8_BIT, 128, 128, 128, 80.0, 20.0 );

std::cout << "outputImage:" << result->toString();

result = imagedev.random_gaussian_image_3d( imagedev.RandomGaussianImage3d.UNSIGNED_INTEGER_8_BIT, 128, 128, 128, 80.0, 20.0 )

print( "output_image:", str( result ) )

IOLink.ImageView result = Processing.RandomGaussianImage3d( RandomGaussianImage3d.OutputType.UNSIGNED_INTEGER_8_BIT, 128, 128, 128, 80.0, 20.0 );

Console.WriteLine( "outputImage:" + result.ToString() );