IPSDK 0.2
IPSDK : Image Processing Software Development Kit
imagebuildLines3dImg (sizeX,sizeY,sizeZ,theta,phi,alpha,offset)

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

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

Header file

#include <IPSDKIPL/IPSDKIPLUtility/Processor/BuildLines3dImg/BuildLines3dImg.h>

Code Example

// copy of image
ImagePtr pOutImg = buildLines3dImg(sizeX, sizeY, sizeZ, theta, phi, alpha, offset);