VectorToMagnitude3d
Computes the amplitude of a 3D vector such as a gradient from its X, Y, and Z components.
Access to parameter description
For an introduction to gradient operations: Gradient Section.
VectorToMagnitude3d extracts the Euclidean norm or maximum component of a 3D vector from its X, Y, and Z components.
It is typically used to compute the magnitude of a 3D image gradient.
The results depend on the selected output mode.
See also
Access to parameter description
For an introduction to gradient operations: Gradient Section.
VectorToMagnitude3d extracts the Euclidean norm or maximum component of a 3D vector from its X, Y, and Z components.
It is typically used to compute the magnitude of a 3D image gradient.
The results depend on the selected output mode.
See also
Function Syntax
This function returns outputAmplitudeImage.
// Function prototype
std::shared_ptr< iolink::ImageView > vectorToMagnitude3d( std::shared_ptr< iolink::ImageView > inputImageX, std::shared_ptr< iolink::ImageView > inputImageY, std::shared_ptr< iolink::ImageView > inputImageZ, VectorToMagnitude3d::OutputType outputType, std::shared_ptr< iolink::ImageView > outputAmplitudeImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
![]() |
inputImageX |
The X vector component input image. | Image | Grayscale or Multispectral | nullptr | ||||
![]() |
inputImageY |
The Y vector component input image. | Image | Grayscale or Multispectral | nullptr | ||||
![]() |
inputImageZ |
The Z vector component input image. | Image | Grayscale or Multispectral | nullptr | ||||
![]() |
outputType |
The output mode.
|
Enumeration | AMPLITUDE_MAXIMUM | |||||
![]() |
outputAmplitudeImage |
The gradient amplitude output image. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); VectorToMagnitude3d vectorToMagnitude3dAlgo; vectorToMagnitude3dAlgo.setInputImageX( foam ); vectorToMagnitude3dAlgo.setInputImageY( foam ); vectorToMagnitude3dAlgo.setInputImageZ( foam ); vectorToMagnitude3dAlgo.setOutputType( VectorToMagnitude3d::OutputType::AMPLITUDE_MAXIMUM ); vectorToMagnitude3dAlgo.execute(); std::cout << "outputAmplitudeImage:" << vectorToMagnitude3dAlgo.outputAmplitudeImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = vectorToMagnitude3d( foam, foam, foam, VectorToMagnitude3d::OutputType::AMPLITUDE_MAXIMUM ); std::cout << "outputAmplitudeImage:" << result->toString();