Programming Reference for VirtualLab Fusion  2026.1
Loading...
Searching...
No Matches
SampledRegion1D Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class which describes a region via sampled data. A data point marks its own local interval as being 'inside' if its value is unequal zero. More...

Inheritance diagram for SampledRegion1D:
Region1D IRegion1D2D IDocument

Public Member Functions

override object Clone ()
 Deep copy of the object.
 
new void DeserializationPostProcessing (ref List< System.Reflection.FieldInfo > unfindableFields, RemainingData remainingData)
 Method for doing post-processing after XML deserialization. Especially, handling of fields which have been altered since the version the data were saved with. But also additional operations (like filling caching variables etc.) can be done here.
 
override void Dispose ()
 
override bool Equals (object obj, EqualityIntent equalityIntent)
 Equality operator.
 
override double[] GetCoordinatesOfActualSubregionBorders (ExtrapolationInfo extrapolation2use)
 
override int GetHashCode ()
 
override InsideOutside GetInOutRelation (double point, ExtrapolationInfo extrapolation2use=null)
 Method which checks whether or not a point lies inside or outside the 1D region or on its boundary. A data point marks its own small rectangular region as being 'inside' if its value is unequal zero.
 
void InterpolateRegionData (double newSamplingDistance, int newSamplingPointNumber)
 Interpolates the current sampled region data.
 
 SampledRegion1D (bool initWithTemplateData)
 Default constructor creating a default sampled RegionData object.
 
 SampledRegion1D (ComplexAmplitude signalRegion)
 Constructor getting an old signal region (represented by ComplexAmplitude) as parameter.
 
 SampledRegion1D (DataArray1D regionData)
 Constructor which gets the sampled region data as data array.
 
 SampledRegion1D (Region1D region, SamplingParameters sp,(bool center, bool nodeCentering) centerAroundZero)
 Constructor converting a non sampled region to a sampled one.
 
 SampledRegion1D (SampledRegion1D regionToCopy)
 Copy constructor.
 
void SetRegionData (DataArray1D regionData2bSet, bool enforceValidity)
 Sets the sampled region data.
 
override void UpdatePropertyOfCoordinates ()
 Method for handling update after change of the physical property of the coordinate.
 
- Public Member Functions inherited from Region1D
override object Clone ()
 Clones the current object.
 
override bool Equals (object obj, EqualityIntent equalityIntent)
 Equality operation.
 
double[] GetCoordinatesOfActualSubregionBorders (ExtrapolationInfo extrapolation2use)
 Method that gets the coordinates where a real subregion starts or ends. It doesn't contain borders of subregions which are no real borders but only those, where the inside/outside state changes.
 
override int GetHashCode ()
 
InsideOutside GetInOutRelation (double point, ExtrapolationInfo extrapolation2use=null)
 Method which checks whether or not a point lies inside or outside the 1D region or on its boundary.
 
override FormDocument GetNewDocumentWindow (Form formMain, string fileName)
 Gets a new document window containing this document.
Parameters
formMainReference to the main form (= MDI parent). Can be null if this form will not be shown (e.g. if it is generated just to get the view settings.
fileNameFile name from which the document was opened for inserting into window caption. If this string is empty, the default document name is used.
Returns
A FormDocument containing this document.

 
bool IsInside (double point)
 Method which checks whether or not a point is inside the 1D region.
 
void MayBeNonzeroOutside (out bool maybeNonZeroLeft, out bool maybeNonZeroRight)
 Method which determines whether or not the region can provide "inside" state outside of its boundary interval. This is not the case for extrapolation mode 'ConstantZero', of course.
 
 Region1D (bool boundariesAreInside, PhysicalProperty propertyOfCoordinates=PhysicalProperty.Length)
 Constructor which gets the _boundariesAreInside flag. To be called from derived classes constructors.
 
 Region1D (Region1D region2bCopied)
 Copy constructor.
 

Static Public Member Functions

static DataArray1DRestrictions GetRegionDataRestrictions ()
 Method which gets the restrictions which apply to the RegionData object.
 
static bool operator!= (SampledRegion1D o1, SampledRegion1D o2)
 Unequals operator.
 
static bool operator== (SampledRegion1D o1, SampledRegion1D o2)
 Equals operator.
 
- Static Public Member Functions inherited from Region1D
static Region1D InvertRegion (Region1D region2Invert)
 Creates a new region with inverted in / out regions compared to this.
 
static Region1D Load (string fileName)
 Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VL 6.0) or with view settings.
 
static bool operator!= (Region1D o1, Region1D o2)
 Unequals operator.
 
static bool operator== (Region1D o1, Region1D o2)
 Equals operator.
 
static Region1D Translate (Region1D regionToShift, double shift)
 Translates (shifts) a given region by a given value.
 

Properties

override PhysicalValueRange BoundingInterval [get]
 Gets the bounding interval for the 1D region.
 
DataArray1D RegionData [get]
 Get or set the sampled region data. All values unequal zero will be interpreted as 'inside' the region. The other values will mark areas 'outside'.
 
- Properties inherited from Region1D
bool BoundariesAreInside [get, set]
 Gets or sets whether or not the boundaries of the region belong to the inner region.
 
PhysicalValueRange BoundingInterval [get]
 Gets the bounding interval for the 1D region.
 
string CommentOfCoordinates [get, set]
 Gets and sets the comment for the coordinates.
 
ExtrapolationInfo ExtrapolationHandling [get, set]
 The extrapolation mode for this region.
 
bool IsOneD [get]
 Gets whether this IRegion1D2D is 1D or 2D.
 
string Name [get, set]
 The name which can be given to the region by the user.
 
PhysicalProperty PropertyOfCoordinates [get, set]
 Physical property of the coordinates of the region.
 
Region1DType RegionType [get]
 Gets the type of the region.
 
SamplingParameters SamplingForUsageWithComplexFields [get, set]
 Sampling parameters which will be used for a coordinate rescaling in case of using the region with a complex field.
 
- Properties inherited from IDocument
VirtualLabSession Session [get, set]
 every documents need to be handled in a session ==> default is the VirtualLab Mainsession
 
NodeVLExplorer TreeStructure [get]
 every document should have a node (maybe with subnodes) in the VirtualLab Explorer
 
DocumentType TypeOfDocument [get]
 Gets an enum entry specifying the type of the document.
 

Additional Inherited Members

- Static Public Attributes inherited from Region1D
const string DefaultDocumentName
 The default document name (= type description) for an Order Collection.
 
static readonly string FileDialogFilterString
 The filter string used in "Open File" dialogs.
 
const string FileExtensionString
 The file extension for an Order Collection.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class which describes a region via sampled data. A data point marks its own local interval as being 'inside' if its value is unequal zero.

Constructor & Destructor Documentation

◆ SampledRegion1D() [1/5]

SampledRegion1D ( bool initWithTemplateData)

Default constructor creating a default sampled RegionData object.

Parameters
initWithTemplateDataIf true, the sampled data will be initialized with template data.

◆ SampledRegion1D() [2/5]

Constructor which gets the sampled region data as data array.

Parameters
regionDataSampled region data to be set.

◆ SampledRegion1D() [3/5]

Copy constructor.

Parameters
regionToCopySampledRegion2D to copy.

◆ SampledRegion1D() [4/5]

SampledRegion1D ( Region1D region,
SamplingParameters sp,
(bool center, bool nodeCentering) centerAroundZero )

Constructor converting a non sampled region to a sampled one.

Parameters
regionRegion to be sampled
spSampling Parameters
centerAroundZeroIf true, the sampled data will be centered around zero, otherwise the old region coordinates will be kept unchanged.

◆ SampledRegion1D() [5/5]

Constructor getting an old signal region (represented by ComplexAmplitude) as parameter.

Parameters
signalRegionThe old signal region

Member Function Documentation

◆ Clone()

override object Clone ( )

Deep copy of the object.

Returns
A deep copy of this.

◆ DeserializationPostProcessing()

new void DeserializationPostProcessing ( ref List< System.Reflection.FieldInfo > unfindableFields,
RemainingData remainingData )

Method for doing post-processing after XML deserialization. Especially, handling of fields which have been altered since the version the data were saved with. But also additional operations (like filling caching variables etc.) can be done here.

Parameters
unfindableFieldsList of all those fields which are expected but could not be read from XML.
remainingDataData contained in XML but which haven't been read yet.

◆ Equals()

override bool Equals ( object obj,
EqualityIntent equalityIntent )

Equality operator.

Parameters
obj
equalityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or physical equality.
Returns

◆ GetInOutRelation()

override InsideOutside GetInOutRelation ( double point,
ExtrapolationInfo extrapolation2use = null )

Method which checks whether or not a point lies inside or outside the 1D region or on its boundary. A data point marks its own small rectangular region as being 'inside' if its value is unequal zero.

Parameters
pointThe point to be checked whether it lies inside.
extrapolation2useExtrapolation info actually to be used.
Returns
Information where the point lies in relation to the region.

◆ GetRegionDataRestrictions()

static DataArray1DRestrictions GetRegionDataRestrictions ( )
static

Method which gets the restrictions which apply to the RegionData object.

Returns
The restrictions which apply to the RegionData object.

◆ InterpolateRegionData()

void InterpolateRegionData ( double newSamplingDistance,
int newSamplingPointNumber )

Interpolates the current sampled region data.

Parameters
newSamplingDistanceNew sampling distance of the sampled region.
newSamplingPointNumberNew number of sampling points of the sampled region.

◆ operator!=()

static bool operator!= ( SampledRegion1D o1,
SampledRegion1D o2 )
static

Unequals operator.

Parameters
o1
o2
Returns

◆ operator==()

static bool operator== ( SampledRegion1D o1,
SampledRegion1D o2 )
static

Equals operator.

Parameters
o1
o2
Returns

◆ SetRegionData()

void SetRegionData ( DataArray1D regionData2bSet,
bool enforceValidity )

Sets the sampled region data.

Parameters
regionData2bSetSampled data to be set. The data array has to fulfill some restrictions defined in the static method GetRegionDataRestrictions().
enforceValidityIf true, a data array not fulfilling the restrictions will be adapted so it does. if false, a data array not fulfilling the restrictions will cause an ArgumentException.