ImageDev

EndPoints3d

Point detector selecting end points of a three-dimensional binary image.

Access to parameter description

For an introduction:
This algorithm is a point detector that selects end points of a skeleton (all object voxels having only one neighbor).
The skeleton is first detected, and then this algorithm performs a hit-or-miss transform (HMT) with the following configuration and its 25 associated rotations: $$ \begin{array}{ccc} 0 & 0 & 0\\ 0 & \times & 0\\ 0 & 0 & 0 \end{array} ~~~~~~~~~~~~ \begin{array}{ccc} 0 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 0 \end{array} ~~~~~~~~~~~~ \begin{array}{ccc} 0 & 0 & 0\\ 0 & 0 & 0\\ 0 & 0 & 0 \end{array} $$ Where $\times$ means "don't care".

See also

Function Syntax

This function returns outputBinaryImage.
// Function prototype
std::shared_ptr< iolink::ImageView > endPoints3d( std::shared_ptr< iolink::ImageView > inputBinaryImage, EndPoints3d::BorderCondition borderCondition, EndPoints3d::Neighborhood neighborhood, std::shared_ptr< iolink::ImageView > outputBinaryImage = NULL );
This function returns outputBinaryImage.
// Function prototype.
end_points_3d( input_binary_image,
               border_condition = EndPoints3d.BorderCondition.ZERO,
               neighborhood = EndPoints3d.Neighborhood.CONNECTIVITY_26,
               output_binary_image = None )
This function returns outputBinaryImage.
// Function prototype.
public static IOLink.ImageView
EndPoints3d( IOLink.ImageView inputBinaryImage,
             EndPoints3d.BorderCondition borderCondition = ImageDev.EndPoints3d.BorderCondition.ZERO,
             EndPoints3d.Neighborhood neighborhood = ImageDev.EndPoints3d.Neighborhood.CONNECTIVITY_26,
             IOLink.ImageView outputBinaryImage = null );

Class Syntax

Parameters

Class Name EndPoints3d

Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The binary input image. Image Binary nullptr
input
borderCondition
The way to consider voxels out of image borders.
ZERO Voxels outside of the image are considered as having the value 0.
MIRROR Voxels outside of the image are considered as an extrapolation of the image pixels with a mirror border condition.
Enumeration ZERO
input
neighborhood
The 3D neighborhood configuration.
CONNECTIVITY_6 The structuring element is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18 The structuring element is composed of voxels with at least one common edge.
CONNECTIVITY_26 The structuring element is a full cube.
Enumeration CONNECTIVITY_26
output
outputBinaryImage
The binary output image. Its size and type are forced to the same values as the input. Image nullptr

Object Examples

auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" );

EndPoints3d endPoints3dAlgo;
endPoints3dAlgo.setInputBinaryImage( foam_sep );
endPoints3dAlgo.setBorderCondition( EndPoints3d::BorderCondition::ZERO );
endPoints3dAlgo.setNeighborhood( EndPoints3d::Neighborhood::CONNECTIVITY_26 );
endPoints3dAlgo.execute();

std::cout << "outputBinaryImage:" << endPoints3dAlgo.outputBinaryImage()->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

end_points_3d_algo = imagedev.EndPoints3d()
end_points_3d_algo.input_binary_image = foam_sep
end_points_3d_algo.border_condition = imagedev.EndPoints3d.ZERO
end_points_3d_algo.neighborhood = imagedev.EndPoints3d.CONNECTIVITY_26
end_points_3d_algo.execute()

print( "output_binary_image:", str( end_points_3d_algo.output_binary_image ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

EndPoints3d endPoints3dAlgo = new EndPoints3d
{
    inputBinaryImage = foam_sep,
    borderCondition = EndPoints3d.BorderCondition.ZERO,
    neighborhood = EndPoints3d.Neighborhood.CONNECTIVITY_26
};
endPoints3dAlgo.Execute();

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

Function Examples

auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" );

auto result = endPoints3d( foam_sep, EndPoints3d::BorderCondition::ZERO, EndPoints3d::Neighborhood::CONNECTIVITY_26 );

std::cout << "outputBinaryImage:" << result->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

result = imagedev.end_points_3d( foam_sep, imagedev.EndPoints3d.ZERO, imagedev.EndPoints3d.CONNECTIVITY_26 )

print( "output_binary_image:", str( result ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

IOLink.ImageView result = Processing.EndPoints3d( foam_sep, EndPoints3d.BorderCondition.ZERO, EndPoints3d.Neighborhood.CONNECTIVITY_26 );

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