List of my modules...

Module: Project_on_Cylinder

Description:

From a set of input points and a cylinder, respectively contained in a class HxCluster and in a class HxLineSet, the cylinder being defined by one segment which represents the axis of a cylinder, the radius being the first element of the first data column, this module projects the points onto the cylinder.

It creates two types of outputs, the first is an output 2D map, of type HxUniformScalarField3, of the distances of the points to the cylinder axis. The second is additional columns in the input point set that give the cylindrical coordinates of the points, and they are:


Illustration of the module's outputs. First row. Left: input image volume representation, from which the rest of the data is derived. Middle: perpendicular cross-sections of the input image, with the points of the outer edge highlighted in red. It is these points that will be projected onto the cylinder that has been fitted to the object (using the Encircle and Fit_Cylinder modules). Right: View of the cylinder, with its axis, the first point that defines the axis, which will be used to define the heights of the projected points, and the reference angle θ, of around 2.4 radians, that will be used to define the angle of the points around the cylinder axis.
Middle row. Left: diagram showing how these values are defined. The view is perpendicular to the cylinder axis, located at the center of the diagram. Angles are defined in radians and are counter-clockwise from the X-axis of the coordinate system. A reference angle θ can be specified and used as offset. An input point p is projected onto the axis, giving p'. Their distance giving r, the radius. The angle a is defined using the specified θ. Right: output image of the projection. A non-zero pixel means one or more input points have been projected onto that pixel. The Y-axis in that image represents the height of the points, the X-axis the angle, and the greylevel the radius.
Bottom row. Data columns added to the input point set. From left to right: radius, height, and angle.

NOTES:

Connections:

Cylinder

[required]
The input cylinder comes from here, it is defined in a class HxLineSet, in which there is only one line, representing the cylinder's axis. The first element of the first data column in this container is the cylinder's radius.

Points

[required]
The points to project onto the cylinder, which are defined in a class HxCluster.

Ports:

Reference angle


This is where θ can be defined.

Display reference angle


Shows where the reference is located, by defining a rectangle as shown in the above illustration. It actually creates a HxSurface output, so you can display it the way you want to. The rectangle can be stretched in or out from the cylinder using the setRefAnglePlaneStretch command.

Action button


Push this button to start the projection.

Commands:

Additional options can be accessed when typing in the console Project_on_Cylinder COMMAND_NAME.

verbose

Displays timing information after the computation. Retype to hide info.

setRefAnglePlaneStretch

Along with a non-zero value, stretches the rectangle used to display the chosen value for θ. For example, the default value of 1 was used in the above illustration, the rectangle extends the entire radius of the cylinder. A value of 2, the rectangle width would be twice the cylinder radius. Stretching the rectangle can be useful in cases where you're manually adjusting θ, and you can't see the rectangle above the input points without a stretch factor.

create

Runs the computation. Returns the name of the output, so it can be used in a script, such as set RESULT [Project_on_Cylinder create].