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 = 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

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 ) ;

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 ) ;