ImageDev

CylindricalIntensityProfile3d

Computes a radial intensity profile on a 3D image by performing a projection along an axis.

Access to parameter description

This algorithm computes an intensity profile that consists in the average intensity at a distance r from a given center. It is computed on a 2D projection of the input volume performed by averaging intensity values along a user-defined axis.
The output is a 2-column spreadsheet indicating, for each radius, the corresponding average intensity value.

<b> Figure 1.</b> Cylindrical intensity profile along a given axis
Figure 1. Cylindrical intensity profile along a given axis

See also

Function Syntax

This function returns outputMeasurement.
// Function prototype
CylindricalIntensityProfileMsr::Ptr cylindricalIntensityProfile3d( std::shared_ptr< iolink::ImageView > inputImage, CylindricalIntensityProfile3d::AxisDirection axisDirection, CylindricalIntensityProfile3d::CenterMode centerMode, iolink::Vector3u32 center, uint32_t maximumRadius, CylindricalIntensityProfileMsr::Ptr outputMeasurement = nullptr );
This function returns outputMeasurement.
// Function prototype.
cylindrical_intensity_profile_3d(input_image: idt.ImageType,
                                 axis_direction: CylindricalIntensityProfile3d.AxisDirection = CylindricalIntensityProfile3d.AxisDirection.Z_AXIS,
                                 center_mode: CylindricalIntensityProfile3d.CenterMode = CylindricalIntensityProfile3d.CenterMode.IMAGE_CENTER,
                                 center: Iterable[int] = [0, 0, 0],
                                 maximum_radius: int = 0,
                                 output_measurement: Union[Any, None] = None) -> CylindricalIntensityProfileMsr
This function returns outputMeasurement.
// Function prototype.
public static CylindricalIntensityProfileMsr
CylindricalIntensityProfile3d( IOLink.ImageView inputImage,
                               CylindricalIntensityProfile3d.AxisDirection axisDirection = ImageDev.CylindricalIntensityProfile3d.AxisDirection.Z_AXIS,
                               CylindricalIntensityProfile3d.CenterMode centerMode = ImageDev.CylindricalIntensityProfile3d.CenterMode.IMAGE_CENTER,
                               uint[] center = null,
                               UInt32 maximumRadius = 0,
                               CylindricalIntensityProfileMsr outputMeasurement = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Any type of image is accepted. Image Grayscale or Multispectral nullptr
input
centerMode
The way to define the origin of the radii.
IMAGE_CENTER The origin of the radii is the center of the input image.
OTHER The origin of the radii is user defined.
Enumeration IMAGE_CENTER
input
axisDirection
The axis along which slices are projected.
If axis direction is set to X, YZ slices are projected.
X_AXIS The YZ slices are projected.
Y_AXIS The XZ slices are projected.
Z_AXIS The XY slices are projected.
Enumeration Z_AXIS
input
center
The origin of the radii in pixel coordinates. It is only used in OTHER mode. Vector3u32 Any value {0, 0, 0}
input
maximumRadius
The radius in voxels up to which intensities are included in the profile. UInt32 Any value 0
output
outputMeasurement
The output object containing the computed radii and averaged intensities. CylindricalIntensityProfileMsr nullptr
Parameter Name Description Type Supported Values Default Value
input
input_image
The input image. Any type of image is accepted. image Grayscale or Multispectral None
input
center_mode
The way to define the origin of the radii.
IMAGE_CENTER The origin of the radii is the center of the input image.
OTHER The origin of the radii is user defined.
enumeration IMAGE_CENTER
input
axis_direction
The axis along which slices are projected.
If axis direction is set to X, YZ slices are projected.
X_AXIS The YZ slices are projected.
Y_AXIS The XZ slices are projected.
Z_AXIS The XY slices are projected.
enumeration Z_AXIS
input
center
The origin of the radii in pixel coordinates. It is only used in OTHER mode. vector3u32 Any value [0, 0, 0]
input
maximum_radius
The radius in voxels up to which intensities are included in the profile. uint32 Any value 0
output
output_measurement
The output object containing the computed radii and averaged intensities. CylindricalIntensityProfileMsr None
Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Any type of image is accepted. Image Grayscale or Multispectral null
input
centerMode
The way to define the origin of the radii.
IMAGE_CENTER The origin of the radii is the center of the input image.
OTHER The origin of the radii is user defined.
Enumeration IMAGE_CENTER
input
axisDirection
The axis along which slices are projected.
If axis direction is set to X, YZ slices are projected.
X_AXIS The YZ slices are projected.
Y_AXIS The XZ slices are projected.
Z_AXIS The XY slices are projected.
Enumeration Z_AXIS
input
center
The origin of the radii in pixel coordinates. It is only used in OTHER mode. Vector3u32 Any value {0, 0, 0}
input
maximumRadius
The radius in voxels up to which intensities are included in the profile. UInt32 Any value 0
output
outputMeasurement
The output object containing the computed radii and averaged intensities. CylindricalIntensityProfileMsr null

Object Examples

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

CylindricalIntensityProfile3d cylindricalIntensityProfile3dAlgo;
cylindricalIntensityProfile3dAlgo.setInputImage( foam );
cylindricalIntensityProfile3dAlgo.setAxisDirection( CylindricalIntensityProfile3d::AxisDirection::Z_AXIS );
cylindricalIntensityProfile3dAlgo.setCenterMode( CylindricalIntensityProfile3d::CenterMode::IMAGE_CENTER );
cylindricalIntensityProfile3dAlgo.setCenter( {0, 0, 0} );
cylindricalIntensityProfile3dAlgo.setMaximumRadius( 255 );
cylindricalIntensityProfile3dAlgo.execute();

std::cout << "mean: " << cylindricalIntensityProfile3dAlgo.outputMeasurement()->mean( 0 , 0 , 0 ) ;
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

cylindrical_intensity_profile_3d_algo = imagedev.CylindricalIntensityProfile3d()
cylindrical_intensity_profile_3d_algo.input_image = foam
cylindrical_intensity_profile_3d_algo.axis_direction = imagedev.CylindricalIntensityProfile3d.Z_AXIS
cylindrical_intensity_profile_3d_algo.center_mode = imagedev.CylindricalIntensityProfile3d.IMAGE_CENTER
cylindrical_intensity_profile_3d_algo.center = [0, 0, 0]
cylindrical_intensity_profile_3d_algo.maximum_radius = 255
cylindrical_intensity_profile_3d_algo.execute()

print("mean: ", str(cylindrical_intensity_profile_3d_algo.output_measurement.mean(0, 0, 0)))
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

CylindricalIntensityProfile3d cylindricalIntensityProfile3dAlgo = new CylindricalIntensityProfile3d
{
    inputImage = foam,
    axisDirection = CylindricalIntensityProfile3d.AxisDirection.Z_AXIS,
    centerMode = CylindricalIntensityProfile3d.CenterMode.IMAGE_CENTER,
    center = new uint[]{0, 0, 0},
    maximumRadius = 255
};
cylindricalIntensityProfile3dAlgo.Execute();

Console.WriteLine( "mean: " + cylindricalIntensityProfile3dAlgo.outputMeasurement.mean( 0 , 0 , 0 ) );

Function Examples

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

auto result = cylindricalIntensityProfile3d( foam, CylindricalIntensityProfile3d::AxisDirection::Z_AXIS, CylindricalIntensityProfile3d::CenterMode::IMAGE_CENTER, {0, 0, 0}, 255 );

std::cout << "mean: " << result->mean( 0 , 0 , 0 ) ;
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

result = imagedev.cylindrical_intensity_profile_3d(foam, imagedev.CylindricalIntensityProfile3d.Z_AXIS, imagedev.CylindricalIntensityProfile3d.IMAGE_CENTER, [0, 0, 0], 255)

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

CylindricalIntensityProfileMsr result = Processing.CylindricalIntensityProfile3d( foam, CylindricalIntensityProfile3d.AxisDirection.Z_AXIS, CylindricalIntensityProfile3d.CenterMode.IMAGE_CENTER, new uint[]{0, 0, 0}, 255 );

Console.WriteLine(  "mean: " + result.mean( 0 , 0 , 0 )  );