You are here: Start » FIL.NET » Function Reference » Image » Image Combinators » FIL.ComposeImages
Takes pixels from the first image within the specified region and from the other one elsewhere.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void ComposeImages ( FilNet.Image inImage1, FilNet.Image inImage2, FilNet.Region inRegion, NullableRef<FilNet.Region> inRoi, FilNet.Image outImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage1 | FilNet.Image | First source of pixels marked in inRegion. | ||
![]() | inImage2 | FilNet.Image | Background image. | ||
![]() | inRegion | FilNet.Region | Region which describes which pixels should be taken from inImage1. | ||
![]() | inRoi | FilNet.NullableRef<FilNet.Region> | Region in which pixels should be processed otherwise black pixels are placed. Default value: ftl::NIL. | ||
![]() | outImage | FilNet.Image | Image composed of tho input images. |
Description
The operation computes the composition of two images. Each outImage pixel is equal to the corresponding pixel of inImage1 iff
its location lies inside the inRegion; otherwise the pixel is equal to the corresponding pixel of the inImage2.
The operation requires that the images being processed have equal format and dimensions, otherwise an error with appropriate description occurs. To obtain an image of desired dimensions one can use ResizeImage or CropImage filter. To alter the pixel type of an image one can use ConvertPixelType filter. ConvertToMultichannel and AverageChannels filters allow to alter the number of image channels.
Examples
![]() |
![]() |
Example inImage1 and inImage2.
![]() |
![]() |
Example inRegion and the result of ComposeImages
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Image formats are not the same in ComposeImages. |
DomainError | Image sizes are not equal in ComposeImages. |
DomainError | Input region exceeds an input image in ComposeImages. |
DomainError | Input ROI exceeds an input image in ComposeImages. |