RotateCenterImage2d
Applies a centered rotation of a given angle on a two-dimensional image.
Access to parameter description
This command is deprecated, it will be removed in ImageDev 2024.2.
You can use Rotate2d instead.
RotateCenterImage2d performs a rotation of an image by a user-defined angle using the image center as axis of rotation.
See also
Access to parameter description
This command is deprecated, it will be removed in ImageDev 2024.2.
You can use Rotate2d instead.
RotateCenterImage2d performs a rotation of an image by a user-defined angle using the image center as axis of rotation.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > rotateCenterImage2d( std::shared_ptr< iolink::ImageView > inputImage, double rotationAngle, RotateCenterImage2d::InterpolationType interpolationType, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype. rotate_center_image_2d( input_image, rotation_angle = 10, interpolation_type = RotateCenterImage2d.InterpolationType.NEAREST_NEIGHBOR, output_image = None )
This function returns outputImage.
// Function prototype. public static IOLink.ImageView RotateCenterImage2d( IOLink.ImageView inputImage, double rotationAngle = 10, RotateCenterImage2d.InterpolationType interpolationType = ImageDev.RotateCenterImage2d.InterpolationType.NEAREST_NEIGHBOR, 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 | |||||
rotationAngle |
The angle of the rotation in degrees. | Float64 | Any value | 10 | |||||
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 dimensions and type are forced to the same values as the input. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
input_image |
The input image. | image | Binary, Label, Grayscale or Multispectral | None | |||||
rotation_angle |
The angle of the rotation in degrees. | float64 | Any value | 10 | |||||
interpolation_type |
The interpolation mode. Method used to calculate the intensity of each pixel in the result image.
|
enumeration | NEAREST_NEIGHBOR | ||||||
output_image |
The output image. Its dimensions and type are forced to the same values as the input. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | null | |||||
rotationAngle |
The angle of the rotation in degrees. | Float64 | Any value | 10 | |||||
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 dimensions and type are forced to the same values as the input. | Image | null |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); RotateCenterImage2d rotateCenterImage2dAlgo; rotateCenterImage2dAlgo.setInputImage( polystyrene ); rotateCenterImage2dAlgo.setRotationAngle( 10.0 ); rotateCenterImage2dAlgo.setInterpolationType( RotateCenterImage2d::InterpolationType::NEAREST_NEIGHBOR ); rotateCenterImage2dAlgo.execute(); std::cout << "outputImage:" << rotateCenterImage2dAlgo.outputImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) rotate_center_image_2d_algo = imagedev.RotateCenterImage2d() rotate_center_image_2d_algo.input_image = polystyrene rotate_center_image_2d_algo.rotation_angle = 10.0 rotate_center_image_2d_algo.interpolation_type = imagedev.RotateCenterImage2d.NEAREST_NEIGHBOR rotate_center_image_2d_algo.execute() print( "output_image:", str( rotate_center_image_2d_algo.output_image ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); RotateCenterImage2d rotateCenterImage2dAlgo = new RotateCenterImage2d { inputImage = polystyrene, rotationAngle = 10.0, interpolationType = RotateCenterImage2d.InterpolationType.NEAREST_NEIGHBOR }; rotateCenterImage2dAlgo.Execute(); Console.WriteLine( "outputImage:" + rotateCenterImage2dAlgo.outputImage.ToString() );
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = rotateCenterImage2d( polystyrene, 10.0, RotateCenterImage2d::InterpolationType::NEAREST_NEIGHBOR ); std::cout << "outputImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) result = imagedev.rotate_center_image_2d( polystyrene, 10.0, imagedev.RotateCenterImage2d.NEAREST_NEIGHBOR ) print( "output_image:", str( result ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); IOLink.ImageView result = Processing.RotateCenterImage2d( polystyrene, 10.0, RotateCenterImage2d.InterpolationType.NEAREST_NEIGHBOR ); Console.WriteLine( "outputImage:" + result.ToString() );