Resize3d
Generates a three-dimensional image with a new size using a user-defined interpolation mode.
Access to parameter description
This algorithm resamples a 3D image to generate a new image with a different size by applying a user-defined interpolation mode.
See also
Access to parameter description
This algorithm resamples a 3D image to generate a new image with a different size by applying a user-defined interpolation mode.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > resize3d( std::shared_ptr< iolink::ImageView > inputImage, iolink::Vector3i32 shape, Resize3d::InterpolationType interpolationType, std::shared_ptr< iolink::ImageView > outputImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
![]() |
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | nullptr | ||||
![]() |
shape |
The X, Y and Z size of the new image, in pixels. | Vector3i32 | >0 | {512, 512, 512} | ||||
![]() |
interpolationType |
The interpolation mode. Method used to calculate the intensity of each pixel in the result image.
|
Enumeration | NEAREST_NEIGHBOR | |||||
![]() |
outputImage |
The output image. Its type is forced to the same value as the input. Its dimensions are defined by the shape parameter. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); Resize3d resize3dAlgo; resize3dAlgo.setInputImage( foam ); resize3dAlgo.setShape( {512, 512, 512} ); resize3dAlgo.setInterpolationType( Resize3d::InterpolationType::NEAREST_NEIGHBOR ); resize3dAlgo.execute(); std::cout << "outputImage:" << resize3dAlgo.outputImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = resize3d( foam, {512, 512, 512}, Resize3d::InterpolationType::NEAREST_NEIGHBOR ); std::cout << "outputImage:" << result->toString();