You are here: Start » FIL.NET » Function Reference » Surface » Surface Spatial Transforms » FIL.CropSurface
Removes from the surface points that are not contained in a given rectangular box.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void CropSurface ( FilNet.Surface inSurface, FilNet.ValueLimits_f64 inXLimits, FilNet.ValueLimits_f64 inYLimits, FilNet.ValueLimits_f64 inZLimits, bool inPreserveDimensions, FilNet.Surface outSurface )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inSurface | FilNet.Surface | Input surface. | ||
![]() | inXLimits | FilNet.ValueLimits_f64 | |||
![]() | inYLimits | FilNet.ValueLimits_f64 | |||
![]() | inZLimits | FilNet.ValueLimits_f64 | |||
![]() | inPreserveDimensions | bool | False | Flag indicating whether the surface dimensions should be preserved or not. Default value: False. | |
![]() | outSurface | FilNet.Surface | Output surface. |
Description
The operation removes points from surface that are not contained in a given rectangular box within provided coordinates.
It is also possible to narrow this box by editing inRoi, Region of Interest of operation.
Coordinates are defined via acceptable limits for their values. E.g. inXLimits.MinValue is minimum and inXLimits.MaxValue is maximum value of the X coordinate. Every point with its X coordinate outside of this range is removed.
Flag inPreserveDimensions informs if the operation output should keep the original dimensions of its input. E.g. if inSurface has its Width=300, Height=200 and Pitch=608 and the flag is enabled, the outSurface will have exactly the same dimensions of 300x200x608. However, if the flag is disabled, outSurface will have its dimensions smaller to adjust them to surface size, but its XOffset, YOffset, ZOffset properties will be accordingly bigger in order to keep the surface in the same place in workspace.
Operation returns the cropped Surface as well as removed Region if one needs to perform further actions on removed points.
Examples
![]() |
![]() |
A sample Surface object. |
The same Surface object seen from above. |
![]() |
![]() |
A sample Surface object cropped through half of its height. |
Cropped Surface object seen from above. |
![]() |
![]() |
Properties of a cropped surface with dimension preservation enabled. |
Properties of a cropped surface with dimension preservation disabled. |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Region of interest exceeds an input surface in CropSurface. |
Function Overrides
- CropSurface(Surface, NullableRef<Region>, ValueLimits_f64, ValueLimits_f64, ValueLimits_f64, Boolean, Surface)
- CropSurface(Surface, NullableRef<Region>, ValueLimits_f64, ValueLimits_f64, ValueLimits_f64, Boolean, Surface, Region)
- CropSurface(Surface, NullableRef<Region>, ValueLimits_f64, ValueLimits_f64, ValueLimits_f64, Boolean, Surface, NullableRef<Region>)