IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Generates a 3D binary image with oriented lines. More...

IPSDKIPLUTILITY_API ipsdk::image::ImagePtr ipsdk::imaproc::util::buildLines3dImg (const ipsdk::ipUInt64 sizeX, const ipsdk::ipUInt64 sizeY, const ipsdk::ipUInt64 sizeZ, const ipsdk::ipReal32 theta, const ipsdk::ipReal32 phi, const ipsdk::ipReal32 alpha, const ipsdk::ipReal32 offset)
 wrapper function for Generates a 3D binary image with oriented lines More...
 
IPSDKIPLUTILITY_API void ipsdk::imaproc::util::buildLines3dImg (const ipsdk::ipReal32 theta, const ipsdk::ipReal32 phi, const ipsdk::ipReal32 alpha, const ipsdk::ipReal32 offset, const image::ImagePtr &pOutBinImg)
 wrapper function for Generates a 3D binary image with oriented lines More...
 

Detailed Description

Generates a 3D binary image with oriented lines.

This algorithm generates an image of 3D oriented lines with an angle (InTheta, InPhi), expressed in radians. theta is the angle between the z-axis and the xy-plane. phi is the angle in the xy-plane. Please, see Geometrical conventions for more details about the IPSDK geometric conventions.

The lines intersect an orthogonal plane. The lines are reduced to points in such a plane, describing a rectangular grid. This concept is illustrated in the figure below. The intersection between the lines and the plane is displayed in green and the virtual grid formed by the lines in the plane is showed as thin black lines.

buildLines3d_grid.png

The angle of this grid is defined by the parameter alpha.

One of the generated line is centered in the image and the other are shifted by a distance multiple of offset

Here is an example of generation of a 100x100 image with lines oriented with theta = 20°, phi = 40°, alpha = 10° and the offset is set to 30 pixels.

buildLines3d.png

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InOutputImg3dSize [Input] output image 3d size X
ipsdk::imaproc::attr::InTheta [Input] 2d orientation for processing operation X
ipsdk::imaproc::attr::InPhi [Input] starting azimuth angle offset value X
ipsdk::imaproc::attr::InAlpha [Input] Component of a 3D orientation X
ipsdk::imaproc::attr::InOffset [Input] Offset. Used for instance by shading correction algorithm X
ipsdk::imaproc::attr::OutBinImg3d [Output] 3D binary image customOutput (_pOutBinImg3d, outputBuild3d(_pInOutputImg3dSize))

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::customImageProperty (_pOutBinImg3d,
 ipsdk::imaproc::util::matchROI3d (_pInOutputImg3dSize))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLUtility as util

Code Example

outImg = util.buildLines3dImg(sizeX, sizeY, sizeZ, theta, phi, alpha, offset)

Example of C++ code :

Example informations

Associated library

IPSDKIPLUtility

Header file

Code Example

// copy of image
ImagePtr pOutImg = buildLines3dImg(sizeX, sizeY, sizeZ, theta, phi, alpha, offset);
See also
BuildLines3dImgLvl1
BuildLines3dImgLvl2
BuildLines3dImgLvl3

Function Documentation

◆ buildLines3dImg() [1/2]

IPSDKIPLUTILITY_API ipsdk::image::ImagePtr ipsdk::imaproc::util::buildLines3dImg ( const ipsdk::ipUInt64  sizeX,
const ipsdk::ipUInt64  sizeY,
const ipsdk::ipUInt64  sizeZ,
const ipsdk::ipReal32  theta,
const ipsdk::ipReal32  phi,
const ipsdk::ipReal32  alpha,
const ipsdk::ipReal32  offset 
)

wrapper function for Generates a 3D binary image with oriented lines

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ buildLines3dImg() [2/2]

IPSDKIPLUTILITY_API void ipsdk::imaproc::util::buildLines3dImg ( const ipsdk::ipReal32  theta,
const ipsdk::ipReal32  phi,
const ipsdk::ipReal32  alpha,
const ipsdk::ipReal32  offset,
const image::ImagePtr pOutBinImg 
)

wrapper function for Generates a 3D binary image with oriented lines

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure