eVision .NET API
Loading...
Searching...
No Matches
eVision.EFourierImage Class Reference

The EFourierImage class is used to represent rectangular regions of interest inside EBW32f gray-level images. See ROIs. More...

Inheritance diagram for eVision.EFourierImage:
Collaboration diagram for eVision.EFourierImage:

Public Member Functions

 EFourierImage ()
 Constructs a EFourierImage image.
 EFourierImage (eVision.EFrequentialDomainFormat domainFormat)
 Constructs a EFourierImage image.
 EFourierImage (eVision.EFrequentialDomainFormat domainFormat, int width, int height)
 Constructs a EFourierImage image.
 EFourierImage (eVision.EFrequentialDomainFormat domainFormat, int width, int height, eVision.EBW32f constant)
 Constructs a EFourierImage image.
 EFourierImage (eVision.EFourierImage other)
 Constructs a EFourierImage image.
void InitializeFromUnalignedBuffer (int width, int height, IntPtr buffer, int pitch)
 Initializes image from an unaligned buffer.
void InitializeFromUnalignedBuffer (int width, int height, IntPtr buffer)
 Initializes image from an unaligned buffer.
void ComputeMagnitude (eVision.EImageBW8 dest)
 Computes and outputs the magnitude of each pixel into a new image. A normalization is applied when outputting a EImageBW8 image so that every magnitude values lies inside the [0; 255] range. This is useful when visualizing.
void ComputeMagnitude (eVision.EImageBW32f dest)
 Computes and outputs the magnitude of each pixel into a new image. A normalization is applied when outputting a EImageBW8 image so that every magnitude values lies inside the [0; 255] range. This is useful when visualizing.
void ComputePhase (eVision.EImageBW8 dest)
 Computes and outputs the phase of each pixel into a new image. A normalization is applied when outputting into a EImageBW8 image so that every magnitude values lie inside the [0; 255] range. This is useful when visualizing.
void ComputePhase (eVision.EImageBW32f dest)
 Computes and outputs the phase of each pixel into a new image. A normalization is applied when outputting into a EImageBW8 image so that every magnitude values lie inside the [0; 255] range. This is useful when visualizing.
void Shift ()
 Rearranges this Fourier transform by shifting the zero-frequency component to the center of the image. Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. This method will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that has already been shifted first with EFourierImage.Shift.
void Shift (eVision.EFourierImage dest)
 Rearranges this Fourier transform by shifting the zero-frequency component to the center of the image. Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. This method will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that has already been shifted first with EFourierImage.Shift.
void Mask (eVision.EFourierImage dest, eVision.ERegion mask)
 Applies a mask, an element wise multiplication between pixel values of the mask (represented as a grayscale image) with the complex number of the fourier image. When using a region as a mask, element of this fourier image contained in the region coordinates will be nullified.
void Mask (eVision.EFourierImage dest, eVision.EImageBW8 region)
 Applies a mask, an element wise multiplication between pixel values of the mask (represented as a grayscale image) with the complex number of the fourier image. When using a region as a mask, element of this fourier image contained in the region coordinates will be nullified.
void InverseShift ()
 Inverses rearrangement of EFourierImage.Shift. Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. Will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that hasn't been shifted first with EFourierImage.Shift.
void InverseShift (eVision.EFourierImage dest)
 Inverses rearrangement of EFourierImage.Shift. Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. Will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that hasn't been shifted first with EFourierImage.Shift.
void ExtractReal (eVision.EImageBW32f dest)
 Extract the real components. When the frequential domain format is extended, this is equivalent to extract all columns whose indices are even. If the format is EFrequentialDomainFormat_Packed, an implicit conversion to the extended format is applied before extracting.
void ExtractImaginary (eVision.EImageBW32f dest)
 Extract the imaginary components. When the frequential domain format is extended, this is equivalent to extract all columns whose indices are odd. If the format is EFrequentialDomainFormat_Packed, an implicit conversion to the extended format is applied before extracting.
IntPtr GetImagePtr ()
 Returns a pointer to the pixel buffer.
void Save (string path)
 Save the EFourierImage object to the given file. Object is saved using the Euresys proprietary file format.
void Save (eVision.ESerializer serializer)
 Save the EFourierImage object to the given file. Object is saved using the Euresys proprietary file format.
void Load (string path)
 Load the EFourierImage object from the given file. Object is loaded assuming the file is in Euresys proprietary format.
void Load (eVision.ESerializer serializer)
 Load the EFourierImage object from the given file. Object is loaded assuming the file is in Euresys proprietary format.
void SaveImage (string path)
 Saves the content of this complex image to a Tiff file.
void Load (string path, eVision.EFrequentialDomainFormat domainFormat)
 Restores an image stored in the given file.
void SetImagePtr (int width, int height, IntPtr imagePointer, eVision.EFrequentialDomainFormat domainFormat, int bitsPerRow)
 Sets the pointer to an externally allocated image buffer.
void SetImagePtr (int width, int height, IntPtr imagePointer, eVision.EFrequentialDomainFormat domainFormat)
 Sets the pointer to an externally allocated image buffer.
void UseExternalBuffer (int width, int height, IntPtr buffer, eVision.EFrequentialDomainFormat domainFormat, int rowPitch)
 Sets the pointer to an externally allocated image buffer.
void SetSize (int width, int height)
 Sets the width and height.
bool IsVoid ()
 Tests whether if the topmost parent image of this hierarchy has a zero size.
void CopyTo (eVision.EFourierImage other)
 Copies all the data of the current EFourierImage object into another EFourierImage object.

Static Public Member Functions

static void ShiftMask (eVision.ERegion region, eVision.ERegion shiftedRegion, int regionWidth, int regionHeight)
 Shifts the mask that can be a region or a grayscale image. This method can be used in case EFourierImage.Mask is applied on a previously shifted frequency image, and if the mask isn't centered properly.
static void ShiftMask (eVision.EImageBW8 mask, eVision.EImageBW8 shiftedMask)
 Shifts the mask that can be a region or a grayscale image. This method can be used in case EFourierImage.Mask is applied on a previously shifted frequency image, and if the mask isn't centered properly.

Properties

eVision.EFrequentialDomainFormat FrequentialDomainFormat [get]
 Returns the frequential domain format.
bool IsShifted [set]
 Sets whether the image has been shifted by EFourierImage.Shift.
int RowPitch [get]
 Gets the pitch of a row (the number of bytes between two vertically adjacent pixels).
int ColPitch [get]
 Gets the pitch of a column (number of bytes between two horizontally adjacent pixels).
int Width [get]
 Gets the width of the underlying image.
int Height [get]
 Gets the height of the underlying image.
uint BitsPerPixel [get]
 Gets the number of storage bits per pixel.
uint PlanesPerPixel [get]
 Gets the number of color components in each pixel of the image.
eVision.EImageType Type [get]
 Gets the image pixel type, as defined by the EImageType enumeration.

Detailed Description

The EFourierImage class is used to represent rectangular regions of interest inside EBW32f gray-level images. See ROIs.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EFourierImage() [1/5]

eVision.EFourierImage.EFourierImage ( )

Constructs a EFourierImage image.

The constructor with no arguments creates a zero-sized image. You can modify the image size by calling EBaseROI.SetSize method.

The sizing constructor constructs an image of the given size. See EBaseROI.SetSize for informations about the sizing restrictions.

The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.

◆ EFourierImage() [2/5]

eVision.EFourierImage.EFourierImage ( eVision.EFrequentialDomainFormat domainFormat)

Constructs a EFourierImage image.

Parameters
domainFormatThe EFrequentialDomainFormat of the EFourierImage.

The constructor with no arguments creates a zero-sized image. You can modify the image size by calling EBaseROI.SetSize method.

The sizing constructor constructs an image of the given size. See EBaseROI.SetSize for informations about the sizing restrictions.

The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.

◆ EFourierImage() [3/5]

eVision.EFourierImage.EFourierImage ( eVision.EFrequentialDomainFormat domainFormat,
int width,
int height )

Constructs a EFourierImage image.

Parameters
domainFormatThe EFrequentialDomainFormat of the EFourierImage.
widthThe width, in pixels.
heightThe height, in pixels.

The constructor with no arguments creates a zero-sized image. You can modify the image size by calling EBaseROI.SetSize method.

The sizing constructor constructs an image of the given size. See EBaseROI.SetSize for informations about the sizing restrictions.

The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.

◆ EFourierImage() [4/5]

eVision.EFourierImage.EFourierImage ( eVision.EFrequentialDomainFormat domainFormat,
int width,
int height,
eVision.EBW32f constant )

Constructs a EFourierImage image.

Parameters
domainFormatThe EFrequentialDomainFormat of the EFourierImage.
widthThe width, in pixels.
heightThe height, in pixels.
constantGray-level constant.

The constructor with no arguments creates a zero-sized image. You can modify the image size by calling EBaseROI.SetSize method.

The sizing constructor constructs an image of the given size. See EBaseROI.SetSize for informations about the sizing restrictions.

The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.

◆ EFourierImage() [5/5]

eVision.EFourierImage.EFourierImage ( eVision.EFourierImage other)

Constructs a EFourierImage image.

Parameters
otherAnother EFourierImage object.

The constructor with no arguments creates a zero-sized image. You can modify the image size by calling EBaseROI.SetSize method.

The sizing constructor constructs an image of the given size. See EBaseROI.SetSize for informations about the sizing restrictions.

The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.

Member Function Documentation

◆ ComputeMagnitude() [1/2]

void eVision.EFourierImage.ComputeMagnitude ( eVision.EImageBW32f dest)

Computes and outputs the magnitude of each pixel into a new image. A normalization is applied when outputting a EImageBW8 image so that every magnitude values lies inside the [0; 255] range. This is useful when visualizing.

Parameters
destThe image that will contain the magnitude.

◆ ComputeMagnitude() [2/2]

void eVision.EFourierImage.ComputeMagnitude ( eVision.EImageBW8 dest)

Computes and outputs the magnitude of each pixel into a new image. A normalization is applied when outputting a EImageBW8 image so that every magnitude values lies inside the [0; 255] range. This is useful when visualizing.

Parameters
destThe image that will contain the magnitude.

◆ ComputePhase() [1/2]

void eVision.EFourierImage.ComputePhase ( eVision.EImageBW32f dest)

Computes and outputs the phase of each pixel into a new image. A normalization is applied when outputting into a EImageBW8 image so that every magnitude values lie inside the [0; 255] range. This is useful when visualizing.

Parameters
destThe image that will contain the phase.

◆ ComputePhase() [2/2]

void eVision.EFourierImage.ComputePhase ( eVision.EImageBW8 dest)

Computes and outputs the phase of each pixel into a new image. A normalization is applied when outputting into a EImageBW8 image so that every magnitude values lie inside the [0; 255] range. This is useful when visualizing.

Parameters
destThe image that will contain the phase.

◆ CopyTo()

void eVision.EFourierImage.CopyTo ( eVision.EFourierImage other)

Copies all the data of the current EFourierImage object into another EFourierImage object.

Parameters
otherAn EFourierImage object in which the current EFourierImage object data have to be copied.

◆ ExtractImaginary()

void eVision.EFourierImage.ExtractImaginary ( eVision.EImageBW32f dest)

Extract the imaginary components. When the frequential domain format is extended, this is equivalent to extract all columns whose indices are odd. If the format is EFrequentialDomainFormat_Packed, an implicit conversion to the extended format is applied before extracting.

Parameters
destImage contains the real components

◆ ExtractReal()

void eVision.EFourierImage.ExtractReal ( eVision.EImageBW32f dest)

Extract the real components. When the frequential domain format is extended, this is equivalent to extract all columns whose indices are even. If the format is EFrequentialDomainFormat_Packed, an implicit conversion to the extended format is applied before extracting.

Parameters
destImage contains the real components

◆ GetImagePtr()

IntPtr eVision.EFourierImage.GetImagePtr ( )

Returns a pointer to the pixel buffer.

◆ InitializeFromUnalignedBuffer() [1/2]

void eVision.EFourierImage.InitializeFromUnalignedBuffer ( int width,
int height,
IntPtr buffer )

Initializes image from an unaligned buffer.

Parameters
widthWidth of the image in the buffer.
heightHeight of the image in the buffer.
bufferAddress of the buffer.

The image will be initialized to fit the width and height passed as arguments. The contents of the buffer will then be copied into the image. The buffer contents must be compatible with the pixel type of the image.

◆ InitializeFromUnalignedBuffer() [2/2]

void eVision.EFourierImage.InitializeFromUnalignedBuffer ( int width,
int height,
IntPtr buffer,
int pitch )

Initializes image from an unaligned buffer.

Parameters
widthWidth of the image in the buffer.
heightHeight of the image in the buffer.
bufferAddress of the buffer.
pitchPitch of the buffer (in bytes). If omitted, the method assumes there is no padding (the pitch is assumed be equal (width * sizeOfAPixel))

The image will be initialized to fit the width and height passed as arguments. The contents of the buffer will then be copied into the image. The buffer contents must be compatible with the pixel type of the image.

◆ InverseShift() [1/2]

void eVision.EFourierImage.InverseShift ( )

Inverses rearrangement of EFourierImage.Shift. Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. Will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that hasn't been shifted first with EFourierImage.Shift.

When not referencing an image, the method is applied in-place.

◆ InverseShift() [2/2]

void eVision.EFourierImage.InverseShift ( eVision.EFourierImage dest)

Inverses rearrangement of EFourierImage.Shift. Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. Will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that hasn't been shifted first with EFourierImage.Shift.

Parameters
destThe image that will contain the shifted image.

When not referencing an image, the method is applied in-place.

◆ IsVoid()

bool eVision.EFourierImage.IsVoid ( )

Tests whether if the topmost parent image of this hierarchy has a zero size.

◆ Load() [1/3]

void eVision.EFourierImage.Load ( eVision.ESerializer serializer)

Load the EFourierImage object from the given file. Object is loaded assuming the file is in Euresys proprietary format.

Parameters
serializerThe ESerializer file-like object that is read from.

◆ Load() [2/3]

void eVision.EFourierImage.Load ( string path)

Load the EFourierImage object from the given file. Object is loaded assuming the file is in Euresys proprietary format.

Parameters
pathThe full path of the file to be loaded.

◆ Load() [3/3]

void eVision.EFourierImage.Load ( string path,
eVision.EFrequentialDomainFormat domainFormat )

Restores an image stored in the given file.

Parameters
pathFull path of the file.
domainFormatFrequential domain format of the loaded image.

◆ Mask() [1/2]

void eVision.EFourierImage.Mask ( eVision.EFourierImage dest,
eVision.EImageBW8 region )

Applies a mask, an element wise multiplication between pixel values of the mask (represented as a grayscale image) with the complex number of the fourier image. When using a region as a mask, element of this fourier image contained in the region coordinates will be nullified.

Parameters
destMasked frequency image.
regionRegion to use as a mask.

The mask is expected to have the same dimension as the spatial image used to compute this fourier transform result. The masking of a packed EFourierImage and the masking of a complex extended EFourierImage computed from the direct fourier transform of the same image yield an equivalent EFourierImage only if:

  • The specified mask is symmetrically central.
  • The first and last columns are vertically symmetric. For more flexibility, use a EFourierImage in the complex extended format.

◆ Mask() [2/2]

void eVision.EFourierImage.Mask ( eVision.EFourierImage dest,
eVision.ERegion mask )

Applies a mask, an element wise multiplication between pixel values of the mask (represented as a grayscale image) with the complex number of the fourier image. When using a region as a mask, element of this fourier image contained in the region coordinates will be nullified.

Parameters
destMasked frequency image.
maskGrayscale image to use as a mask.

The mask is expected to have the same dimension as the spatial image used to compute this fourier transform result. The masking of a packed EFourierImage and the masking of a complex extended EFourierImage computed from the direct fourier transform of the same image yield an equivalent EFourierImage only if:

  • The specified mask is symmetrically central.
  • The first and last columns are vertically symmetric. For more flexibility, use a EFourierImage in the complex extended format.

◆ Save() [1/2]

void eVision.EFourierImage.Save ( eVision.ESerializer serializer)

Save the EFourierImage object to the given file. Object is saved using the Euresys proprietary file format.

Parameters
serializerThe ESerializer file-like object that is written to.

◆ Save() [2/2]

void eVision.EFourierImage.Save ( string path)

Save the EFourierImage object to the given file. Object is saved using the Euresys proprietary file format.

Parameters
pathThe full path of the destination file.

◆ SaveImage()

void eVision.EFourierImage.SaveImage ( string path)

Saves the content of this complex image to a Tiff file.

Parameters
pathPath to the file to save to.

◆ SetImagePtr() [1/2]

void eVision.EFourierImage.SetImagePtr ( int width,
int height,
IntPtr imagePointer,
eVision.EFrequentialDomainFormat domainFormat )

Sets the pointer to an externally allocated image buffer.

Parameters
widthThe width of the supplied buffer, in pixels.
heightThe height of the supplied buffer, in pixels.
imagePointerThe pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image.
domainFormatFrequential domain format of the loaded image.
Deprecated

Use EFourierImage.UseExternalBuffer instead.

Deprecated in version 26.2. Scheduled to be removed in version 27.6.

◆ SetImagePtr() [2/2]

void eVision.EFourierImage.SetImagePtr ( int width,
int height,
IntPtr imagePointer,
eVision.EFrequentialDomainFormat domainFormat,
int bitsPerRow )

Sets the pointer to an externally allocated image buffer.

Parameters
widthThe width of the supplied buffer, in pixels.
heightThe height of the supplied buffer, in pixels.
imagePointerThe pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image.
domainFormatFrequential domain format of the loaded image.
bitsPerRowThe total number of bits contained in a row, padding included. Using the value 0 (default) means that this size is computed from the buffer width and the pixel size plus a padding with the smallest possible value that leads to a multiple of 4 bytes (32 bits), which is the minimum padding accepted by EFourierImage.UseExternalBuffer.
Deprecated

Use EFourierImage.UseExternalBuffer instead.

Deprecated in version 26.2. Scheduled to be removed in version 27.6.

◆ SetSize()

void eVision.EFourierImage.SetSize ( int width,
int height )

Sets the width and height.

Parameters
widthThe new requested image width.
heightThe new requested image height.

◆ Shift() [1/2]

void eVision.EFourierImage.Shift ( )

Rearranges this Fourier transform by shifting the zero-frequency component to the center of the image. Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. This method will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that has already been shifted first with EFourierImage.Shift.

When using the no-argument overload, the method is applied in-place.

◆ Shift() [2/2]

void eVision.EFourierImage.Shift ( eVision.EFourierImage dest)

Rearranges this Fourier transform by shifting the zero-frequency component to the center of the image. Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. This method will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that has already been shifted first with EFourierImage.Shift.

Parameters
destThe image that will contain the shifted image.

When using the no-argument overload, the method is applied in-place.

◆ ShiftMask() [1/2]

void eVision.EFourierImage.ShiftMask ( eVision.EImageBW8 mask,
eVision.EImageBW8 shiftedMask )
static

Shifts the mask that can be a region or a grayscale image. This method can be used in case EFourierImage.Mask is applied on a previously shifted frequency image, and if the mask isn't centered properly.

Parameters
maskGrayscale image to use as a mask.
shiftedMaskShifted grayscale mask.

◆ ShiftMask() [2/2]

void eVision.EFourierImage.ShiftMask ( eVision.ERegion region,
eVision.ERegion shiftedRegion,
int regionWidth,
int regionHeight )
static

Shifts the mask that can be a region or a grayscale image. This method can be used in case EFourierImage.Mask is applied on a previously shifted frequency image, and if the mask isn't centered properly.

Parameters
regionRegion to use as a mask.
shiftedRegionShifted region.
regionWidthWidth of the region.
regionHeightHeight of the region.

◆ UseExternalBuffer()

void eVision.EFourierImage.UseExternalBuffer ( int width,
int height,
IntPtr buffer,
eVision.EFrequentialDomainFormat domainFormat,
int rowPitch )

Sets the pointer to an externally allocated image buffer.

Parameters
widthThe width of the supplied buffer, in pixels.
heightThe height of the supplied buffer, in pixels.
bufferThe pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image.
domainFormatFrequential domain format of the loaded image.
rowPitchThe total number of bytes contained in a row, padding included.

Property Documentation

◆ BitsPerPixel

uint eVision.EFourierImage.BitsPerPixel
get

Gets the number of storage bits per pixel.

◆ ColPitch

int eVision.EFourierImage.ColPitch
get

Gets the pitch of a column (number of bytes between two horizontally adjacent pixels).

◆ FrequentialDomainFormat

eVision.EFrequentialDomainFormat eVision.EFourierImage.FrequentialDomainFormat
get

Returns the frequential domain format.

◆ Height

int eVision.EFourierImage.Height
get

Gets the height of the underlying image.

◆ IsShifted

bool eVision.EFourierImage.IsShifted
set

Sets whether the image has been shifted by EFourierImage.Shift.

◆ PlanesPerPixel

uint eVision.EFourierImage.PlanesPerPixel
get

Gets the number of color components in each pixel of the image.

◆ RowPitch

int eVision.EFourierImage.RowPitch
get

Gets the pitch of a row (the number of bytes between two vertically adjacent pixels).

◆ Type

eVision.EImageType eVision.EFourierImage.Type
get

Gets the image pixel type, as defined by the EImageType enumeration.

◆ Width

int eVision.EFourierImage.Width
get

Gets the width of the underlying image.