ImageDev

RadialGradientContour3d

Performs a three-dimensional gradient projection with a directional vector defined by a set of contour points of a binary image.

Access to parameter description

For an introduction: The RadialGradientContour3d algorithm performs a gradient projection by computing the directional vector from the contour of objects. For a voxel $P$ in the image, the center $C$ taken into account is the closest pixel contour of the closest object.

Notice: See also

Function Syntax

This function returns outputNormalImage.
// Function prototype
std::shared_ptr< iolink::ImageView > radialGradientContour3d( std::shared_ptr< iolink::ImageView > inputImageX, std::shared_ptr< iolink::ImageView > inputImageY, std::shared_ptr< iolink::ImageView > inputImageZ, std::shared_ptr< iolink::ImageView > inputMarkerImage, std::shared_ptr< iolink::ImageView > outputNormalImage = nullptr );
This function returns outputNormalImage.
// Function prototype.
radial_gradient_contour_3d(input_image_x: idt.ImageType,
                           input_image_y: idt.ImageType,
                           input_image_z: idt.ImageType,
                           input_marker_image: idt.ImageType,
                           output_normal_image: idt.ImageType = None) -> idt.ImageType
This function returns outputNormalImage.
// Function prototype.
public static IOLink.ImageView
RadialGradientContour3d( IOLink.ImageView inputImageX,
                         IOLink.ImageView inputImageY,
                         IOLink.ImageView inputImageZ,
                         IOLink.ImageView inputMarkerImage,
                         IOLink.ImageView outputNormalImage = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImageX
The X-gradient input image. Image Grayscale or Multispectral nullptr
input
inputImageY
The Y-gradient input image. Image Grayscale or Multispectral nullptr
input
inputImageZ
The Z-gradient input image. Image Grayscale or Multispectral nullptr
input
inputMarkerImage
The marker input image from which the binary contours are considered as centers. Image Binary nullptr
output
outputNormalImage
The normal gradient output image. Image nullptr
Parameter Name Description Type Supported Values Default Value
input
input_image_x
The X-gradient input image. image Grayscale or Multispectral None
input
input_image_y
The Y-gradient input image. image Grayscale or Multispectral None
input
input_image_z
The Z-gradient input image. image Grayscale or Multispectral None
input
input_marker_image
The marker input image from which the binary contours are considered as centers. image Binary None
output
output_normal_image
The normal gradient output image. image None
Parameter Name Description Type Supported Values Default Value
input
inputImageX
The X-gradient input image. Image Grayscale or Multispectral null
input
inputImageY
The Y-gradient input image. Image Grayscale or Multispectral null
input
inputImageZ
The Z-gradient input image. Image Grayscale or Multispectral null
input
inputMarkerImage
The marker input image from which the binary contours are considered as centers. Image Binary null
output
outputNormalImage
The normal gradient output image. Image null

Object Examples

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

RadialGradientContour3d radialGradientContour3dAlgo;
radialGradientContour3dAlgo.setInputImageX( foam );
radialGradientContour3dAlgo.setInputImageY( foam );
radialGradientContour3dAlgo.setInputImageZ( foam );
radialGradientContour3dAlgo.setInputMarkerImage( foam_sep );
radialGradientContour3dAlgo.execute();

std::cout << "outputNormalImage:" << radialGradientContour3dAlgo.outputNormalImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))

radial_gradient_contour_3d_algo = imagedev.RadialGradientContour3d()
radial_gradient_contour_3d_algo.input_image_x = foam
radial_gradient_contour_3d_algo.input_image_y = foam
radial_gradient_contour_3d_algo.input_image_z = foam
radial_gradient_contour_3d_algo.input_marker_image = foam_sep
radial_gradient_contour_3d_algo.execute()

print("output_normal_image:", str(radial_gradient_contour_3d_algo.output_normal_image))
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );

RadialGradientContour3d radialGradientContour3dAlgo = new RadialGradientContour3d
{
    inputImageX = foam,
    inputImageY = foam,
    inputImageZ = foam,
    inputMarkerImage = foam_sep
};
radialGradientContour3dAlgo.Execute();

Console.WriteLine( "outputNormalImage:" + radialGradientContour3dAlgo.outputNormalImage.ToString() );

Function Examples

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

auto result = radialGradientContour3d( foam, foam, foam, foam_sep );

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

result = imagedev.radial_gradient_contour_3d(foam, foam, foam, foam_sep)

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

IOLink.ImageView result = Processing.RadialGradientContour3d( foam, foam, foam, foam_sep );

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