GaussianGradientTensor3d
Computes a pointwise structure tensor on a three-dimensional image.
Access to parameter description
This algorithm computes the local structure tensor $\begin{pmatrix} I_x.I_x & I_x.I_y & I_x.I_z\\ I_x.I_y & I_y.I_y & I_y.I_z\\ I_x.I_z & I_y.I_z & I_z.I_z \end{pmatrix} = \begin{pmatrix} I_x\\ I_y\\ I_z \end{pmatrix} \cdot \begin{pmatrix} I_x & I_y & I_z\end{pmatrix}$ by convolving the input image with the square first order derivatives of a Gaussian kernel.
Each element of the structure tensor represents a product of two partial derivatives
For instance, $I_x.I_x = \frac{\partial I}{\partial x}\cdot\frac{\partial I}{\partial x}$, $I_x.I_y = \frac{\partial I}{\partial x}\cdot\frac{\partial I}{\partial y}$.
The partial derivatives are computed as explained in the GaussianDerivative3d documentation.
This filter provides a spectral image output where each channel represents a tensor element; for instance, a product of two partial derivatives, set in the following order: $I_x.I_x$, $I_x.I_y$, $I_x.I_z$, $I_y.I_y$, $I_y.I_z$, $I_z.I_z$.
To extract the eigenvalues or vectors of the tensor image the EigenDecomposition3d can be applied on this output image.
See also
Access to parameter description
This algorithm computes the local structure tensor $\begin{pmatrix} I_x.I_x & I_x.I_y & I_x.I_z\\ I_x.I_y & I_y.I_y & I_y.I_z\\ I_x.I_z & I_y.I_z & I_z.I_z \end{pmatrix} = \begin{pmatrix} I_x\\ I_y\\ I_z \end{pmatrix} \cdot \begin{pmatrix} I_x & I_y & I_z\end{pmatrix}$ by convolving the input image with the square first order derivatives of a Gaussian kernel.
Each element of the structure tensor represents a product of two partial derivatives
For instance, $I_x.I_x = \frac{\partial I}{\partial x}\cdot\frac{\partial I}{\partial x}$, $I_x.I_y = \frac{\partial I}{\partial x}\cdot\frac{\partial I}{\partial y}$.
The partial derivatives are computed as explained in the GaussianDerivative3d documentation.
This filter provides a spectral image output where each channel represents a tensor element; for instance, a product of two partial derivatives, set in the following order: $I_x.I_x$, $I_x.I_y$, $I_x.I_z$, $I_y.I_y$, $I_y.I_z$, $I_z.I_z$.
To extract the eigenvalues or vectors of the tensor image the EigenDecomposition3d can be applied on this output image.
See also
Function Syntax
This function returns outputTensorImage.
// Function prototype
std::shared_ptr< iolink::ImageView > gaussianGradientTensor3d( std::shared_ptr< iolink::ImageView > inputImage, iolink::Vector3d standardDeviation, std::shared_ptr< iolink::ImageView > outputTensorImage = NULL );
This function returns outputTensorImage.
// Function prototype. gaussian_gradient_tensor_3d( input_image, standard_deviation = [1, 1, 1], output_tensor_image = None )
This function returns outputTensorImage.
// Function prototype. public static IOLink.ImageView GaussianGradientTensor3d( IOLink.ImageView inputImage, double[] standardDeviation = null, IOLink.ImageView outputTensorImage = null );
Class Syntax
Parameters
Class Name | GaussianGradientTensor3d |
---|
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputImage |
The input image. The image type can be integer or float. | Image | Binary, Label or Grayscale | nullptr | |
standardDeviation |
The sigma value of the Gaussian filter for each direction X, Y, and Z. Each value must be greater than or equal to 0.1. | Vector3d | >=0.1 | {1.f, 1.f, 1.f} | |
outputTensorImage |
The output image. Its spatial dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); GaussianGradientTensor3d gaussianGradientTensor3dAlgo; gaussianGradientTensor3dAlgo.setInputImage( foam ); gaussianGradientTensor3dAlgo.setStandardDeviation( {1, 1, 1} ); gaussianGradientTensor3dAlgo.execute(); std::cout << "outputTensorImage:" << gaussianGradientTensor3dAlgo.outputTensorImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip")) gaussian_gradient_tensor_3d_algo = imagedev.GaussianGradientTensor3d() gaussian_gradient_tensor_3d_algo.input_image = foam gaussian_gradient_tensor_3d_algo.standard_deviation = [1, 1, 1] gaussian_gradient_tensor_3d_algo.execute() print( "output_tensor_image:", str( gaussian_gradient_tensor_3d_algo.output_tensor_image ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); GaussianGradientTensor3d gaussianGradientTensor3dAlgo = new GaussianGradientTensor3d { inputImage = foam, standardDeviation = new double[]{1, 1, 1} }; gaussianGradientTensor3dAlgo.Execute(); Console.WriteLine( "outputTensorImage:" + gaussianGradientTensor3dAlgo.outputTensorImage.ToString() );
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = gaussianGradientTensor3d( foam, {1, 1, 1} ); std::cout << "outputTensorImage:" << result->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip")) result = imagedev.gaussian_gradient_tensor_3d( foam, [1, 1, 1] ) print( "output_tensor_image:", str( result ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); IOLink.ImageView result = Processing.GaussianGradientTensor3d( foam, new double[]{1, 1, 1} ); Console.WriteLine( "outputTensorImage:" + result.ToString() );