ImageDev

DegreeOfAnisotropy

Computes an anisotropy indicator of a binary image with a mean intercept length method.

Access to parameter description

For an introduction: This algorithm computes a measurement of anisotropy. It is a good indicator to detect structural alignments along particular directional axis. The measurement is based on an eigenvalue analysis of the mean intercept length at different angles.

Mean intercept length proceeds by sending a set of oriented rays through the binary input image. A set of discreet angles are processed with a pitch angle fixed at 10 degrees. For each orientation, a regularly spaced grid of rays is shot. The length of the intersection of each ray with the objects encountered is measured, and averaged over the grid of rays. The spacing of this grid is controlled by the interceptDistance parameter, which represents the distance between two intercept lines.

The distribution of the mean intercept length, as a function of the angle, is analyzed using an eigenvalue decomposition. This analysis allows one to extract $\lambda_1$ and $\lambda_2$, respectively, the maximum and minimum eigenvalues. The closer these values are, the less the structural anisotropy is. Indeed, $\lambda_1=\lambda_2$ means that there is no privileged structural direction. $$ DA = \left( 1-\left|\frac{\lambda_2}{\lambda_1}\right| \right) $$ Degree of anisotropy is 0 for total isotropy, and 1 for total anisotropy.

Reference:
A.Odgaard. "Three-Dimensional Methods for Quantification of Cancellous Bone Architecture". Bone, vol. 20, no. 4, pp. 315-328, 1997.

See also

Function Syntax

This function returns outputMeasurement.
// Function prototype
AnisotropyDegreeMsr::Ptr degreeOfAnisotropy( std::shared_ptr< iolink::ImageView > inputBinaryImage, int32_t interceptDistance, AnisotropyDegreeMsr::Ptr outputMeasurement = nullptr );
This function returns outputMeasurement.
// Function prototype.
degree_of_anisotropy(input_binary_image: idt.ImageType,
                     intercept_distance: int = 3,
                     output_measurement: Union[Any, None] = None) -> AnisotropyDegreeMsr
This function returns outputMeasurement.
// Function prototype.
public static AnisotropyDegreeMsr
DegreeOfAnisotropy( IOLink.ImageView inputBinaryImage,
                    Int32 interceptDistance = 3,
                    AnisotropyDegreeMsr outputMeasurement = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The input binary image. Image Binary nullptr
input
interceptDistance
The distance in pixels between two intercept lines. Int32 >=1 3
output
outputMeasurement
The output measurement result. AnisotropyDegreeMsr nullptr
Parameter Name Description Type Supported Values Default Value
input
input_binary_image
The input binary image. image Binary None
input
intercept_distance
The distance in pixels between two intercept lines. int32 >=1 3
output
output_measurement
The output measurement result. AnisotropyDegreeMsr None
Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The input binary image. Image Binary null
input
interceptDistance
The distance in pixels between two intercept lines. Int32 >=1 3
output
outputMeasurement
The output measurement result. AnisotropyDegreeMsr null

Object Examples

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

DegreeOfAnisotropy degreeOfAnisotropyAlgo;
degreeOfAnisotropyAlgo.setInputBinaryImage( polystyrene_sep );
degreeOfAnisotropyAlgo.setInterceptDistance( 3 );
degreeOfAnisotropyAlgo.execute();

std::cout << "anisotropy: " << degreeOfAnisotropyAlgo.outputMeasurement()->anisotropy( 0 ) ;
polystyrene_sep = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_sep.vip"))

degree_of_anisotropy_algo = imagedev.DegreeOfAnisotropy()
degree_of_anisotropy_algo.input_binary_image = polystyrene_sep
degree_of_anisotropy_algo.intercept_distance = 3
degree_of_anisotropy_algo.execute()

print("anisotropy: ", str(degree_of_anisotropy_algo.output_measurement.anisotropy(0)))
ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" );

DegreeOfAnisotropy degreeOfAnisotropyAlgo = new DegreeOfAnisotropy
{
    inputBinaryImage = polystyrene_sep,
    interceptDistance = 3
};
degreeOfAnisotropyAlgo.Execute();

Console.WriteLine( "anisotropy: " + degreeOfAnisotropyAlgo.outputMeasurement.anisotropy( 0 ) );

Function Examples

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

auto result = degreeOfAnisotropy( polystyrene_sep, 3 );

std::cout << "anisotropy: " << result->anisotropy( 0 ) ;
polystyrene_sep = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_sep.vip"))

result = imagedev.degree_of_anisotropy(polystyrene_sep, 3)

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

AnisotropyDegreeMsr result = Processing.DegreeOfAnisotropy( polystyrene_sep, 3 );

Console.WriteLine(  "anisotropy: " + result.anisotropy( 0 )  );