ImageDev

OrientedLinesImage3d

Creates a three-dimensional binary image containing a series of parallel oriented lines.

Access to parameter description

OrientedLinesImage3d creates a binary image with a set of parallel lines with a given orientation and separated by a given offset.
This module creates a binary image with oriented 3D lines. The orientation of these lines is defined by two angles: the polar angle $\phi$ (inclination from Z axis) and the azimuthal angle $\theta$ (orientation from X axis on the XY orthogonal projection).

<b>Figure 1.</b> Mathematics convention for spherical coordinates
Figure 1. Mathematics convention for spherical coordinates

Considering a plane that is orthogonal to this orientation, each line crosses this plane into a single point defining a rectangular grid regularly spaced and oriented by a third angle $\alpha$, as shown in Figure 2.

<b>Figure 2.</b> Orientation of the lines grid
Figure 2. Orientation of the lines grid

See also

Function Syntax

This function returns outputBinaryImage.
// Function prototype
std::shared_ptr< iolink::ImageView > orientedLinesImage3d( int32_t imageSizeX, int32_t imageSizeY, int32_t imageSizeZ, double thetaAngle, double phiAngle, double alphaAngle, double offset, std::shared_ptr< iolink::ImageView > outputBinaryImage = nullptr );
This function returns outputBinaryImage.
// Function prototype.
oriented_lines_image_3d(image_size_x: int = 100,
                        image_size_y: int = 100,
                        image_size_z: int = 100,
                        theta_angle: float = 0,
                        phi_angle: float = 0,
                        alpha_angle: float = 0,
                        offset: float = 30,
                        output_binary_image: idt.ImageType = None) -> idt.ImageType
This function returns outputBinaryImage.
// Function prototype.
public static IOLink.ImageView
OrientedLinesImage3d( Int32 imageSizeX = 100,
                      Int32 imageSizeY = 100,
                      Int32 imageSizeZ = 100,
                      double thetaAngle = 0,
                      double phiAngle = 0,
                      double alphaAngle = 0,
                      double offset = 30,
                      IOLink.ImageView outputBinaryImage = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
imageSizeX
The X size in voxels of the output image. Int32 >=1 100
input
imageSizeY
The Y size in voxels of the output image. Int32 >=1 100
input
imageSizeZ
The Z size in voxels of the output image. Int32 >=1 100
input
thetaAngle
The polar angle in degrees of lines orientation. Float64 Any value 0
input
phiAngle
The azimuthal angle in degrees of lines orientation. Float64 Any value 0
input
alphaAngle
The alpha angle in degrees defining the grid orientation in a plane orthogonal to the lines direction. Float64 Any value 0
input
offset
The distance in voxels between two lines. Float64 >=1 30
output
outputBinaryImage
The output binary image. Image nullptr
Parameter Name Description Type Supported Values Default Value
input
image_size_x
The X size in voxels of the output image. int32 >=1 100
input
image_size_y
The Y size in voxels of the output image. int32 >=1 100
input
image_size_z
The Z size in voxels of the output image. int32 >=1 100
input
theta_angle
The polar angle in degrees of lines orientation. float64 Any value 0
input
phi_angle
The azimuthal angle in degrees of lines orientation. float64 Any value 0
input
alpha_angle
The alpha angle in degrees defining the grid orientation in a plane orthogonal to the lines direction. float64 Any value 0
input
offset
The distance in voxels between two lines. float64 >=1 30
output
output_binary_image
The output binary image. image None
Parameter Name Description Type Supported Values Default Value
input
imageSizeX
The X size in voxels of the output image. Int32 >=1 100
input
imageSizeY
The Y size in voxels of the output image. Int32 >=1 100
input
imageSizeZ
The Z size in voxels of the output image. Int32 >=1 100
input
thetaAngle
The polar angle in degrees of lines orientation. Float64 Any value 0
input
phiAngle
The azimuthal angle in degrees of lines orientation. Float64 Any value 0
input
alphaAngle
The alpha angle in degrees defining the grid orientation in a plane orthogonal to the lines direction. Float64 Any value 0
input
offset
The distance in voxels between two lines. Float64 >=1 30
output
outputBinaryImage
The output binary image. Image null

Object Examples


OrientedLinesImage3d orientedLinesImage3dAlgo;
orientedLinesImage3dAlgo.setImageSizeX( 100 );
orientedLinesImage3dAlgo.setImageSizeY( 100 );
orientedLinesImage3dAlgo.setImageSizeZ( 100 );
orientedLinesImage3dAlgo.setThetaAngle( 0.0 );
orientedLinesImage3dAlgo.setPhiAngle( 0.0 );
orientedLinesImage3dAlgo.setAlphaAngle( 0.0 );
orientedLinesImage3dAlgo.setOffset( 30.0 );
orientedLinesImage3dAlgo.execute();

std::cout << "outputBinaryImage:" << orientedLinesImage3dAlgo.outputBinaryImage()->toString();

oriented_lines_image_3d_algo = imagedev.OrientedLinesImage3d()
oriented_lines_image_3d_algo.image_size_x = 100
oriented_lines_image_3d_algo.image_size_y = 100
oriented_lines_image_3d_algo.image_size_z = 100
oriented_lines_image_3d_algo.theta_angle = 0.0
oriented_lines_image_3d_algo.phi_angle = 0.0
oriented_lines_image_3d_algo.alpha_angle = 0.0
oriented_lines_image_3d_algo.offset = 30.0
oriented_lines_image_3d_algo.execute()

print("output_binary_image:", str(oriented_lines_image_3d_algo.output_binary_image))

OrientedLinesImage3d orientedLinesImage3dAlgo = new OrientedLinesImage3d
{
    imageSizeX = 100,
    imageSizeY = 100,
    imageSizeZ = 100,
    thetaAngle = 0.0,
    phiAngle = 0.0,
    alphaAngle = 0.0,
    offset = 30.0
};
orientedLinesImage3dAlgo.Execute();

Console.WriteLine( "outputBinaryImage:" + orientedLinesImage3dAlgo.outputBinaryImage.ToString() );

Function Examples


auto result = orientedLinesImage3d( 100, 100, 100, 0.0, 0.0, 0.0, 30.0 );

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

result = imagedev.oriented_lines_image_3d(100, 100, 100, 0.0, 0.0, 0.0, 30.0)

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

IOLink.ImageView result = Processing.OrientedLinesImage3d( 100, 100, 100, 0.0, 0.0, 0.0, 30.0 );

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