Programming Reference for VirtualLab Fusion  2022.1
Static Public Member Functions | List of all members
ImportExport Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Collection of static support functions for export and import of data fields. More...

Static Public Member Functions

static void ExportASCII (ComplexAmplitude ca, ASCIIParam param)
 Exports given globally polarized ComplexAmplitude to text file. Note that only a real component of complex amplitude is stored. For complete export of complex amplitude use ExportPTF. More...
 
static void ExportBitmap (ComplexAmplitude complexAmplitude, string fileName, ColorMapping colorMapping)
 Exports the given ComplexAmplitude as Bitmap with given ColorMapping. More...
 
static void ExportBitmap (HarmonicFieldsSet sf, string fileName)
 Exports the light view of a HarmonicFieldsSet as bitmap. More...
 
static ComplexAmplitude ImportASCII (ASCIIParam importASCIIParam)
 Imports an ASCII file into an ComplexAmplitude. More...
 
static ComplexAmplitude ImportASCII (ASCIIParam importASCIIParam, AdditionalCAImportParams additionalParams)
 Imports an ASCII file into an ComplexAmplitude. More...
 
static ComplexField ImportASCII (string fileName, char columnSeparator=' ', char decimalSeparator='.', PrecisionMode precisionMode=PrecisionMode.Double)
 Imports an ASCII file into a ComplexField. More...
 
static ComplexAmplitude ImportBitmap (string fileName, ColorMapping colorMapping, AdditionalCAImportParams parameter)
 Imports the given image to ComplexAmplitude with given ColorMapping. More...
 
static ComplexAmplitude ImportBitmapQuantizedHeightProfile (string fileName, double heightIncrement, bool invert, bool importGDSII, SamplingParameters samplingForGDSII)
 Imports a quantized bitmap into a ComplexAmplitude representing the height profile. More...
 
static ComplexAmplitude ImportBitmapQuantizedHeightProfile (string[] fileNames, double heightIncrement, int numberOfLayers, bool invert, bool importGDSII, SamplingParameters samplingForGDSII)
 Imports a quantized bitmap into a ComplexAmplitude representing the height profile. More...
 
static ComplexAmplitude ImportCa (string fileName, out Rectangle selectedRegion, AdditionalCAImportParams additionalParams)
 Imports ComplexAmplitude from ca file. (VirtualLab 1.x) More...
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Collection of static support functions for export and import of data fields.

Member Function Documentation

◆ ExportASCII()

static void ExportASCII ( ComplexAmplitude  ca,
ASCIIParam  param 
)
static

Exports given globally polarized ComplexAmplitude to text file. Note that only a real component of complex amplitude is stored. For complete export of complex amplitude use ExportPTF.

Parameters
caComplexAmplitude to be exported.
paramAdditional parameters for export.

◆ ExportBitmap() [1/2]

static void ExportBitmap ( ComplexAmplitude  complexAmplitude,
string  fileName,
ColorMapping  colorMapping 
)
static

Exports the given ComplexAmplitude as Bitmap with given ColorMapping.

Parameters
complexAmplitudeComplexAmplitude to be exported.
colorMappingColorMapping to be applied.
fileNameFilename of exported image.

◆ ExportBitmap() [2/2]

static void ExportBitmap ( HarmonicFieldsSet  sf,
string  fileName 
)
static

Exports the light view of a HarmonicFieldsSet as bitmap.

Parameters
sfThe Harmonic Fields Set to export.
fileNameName of the file.
Exceptions
ExceptionExport was not successful

◆ ImportASCII() [1/3]

static ComplexAmplitude ImportASCII ( ASCIIParam  importASCIIParam)
static

Imports an ASCII file into an ComplexAmplitude.

Parameters
importASCIIParamContains all necessary parameters to import.
Returns
Imported ComplexAmplitude.

◆ ImportASCII() [2/3]

static ComplexAmplitude ImportASCII ( ASCIIParam  importASCIIParam,
AdditionalCAImportParams  additionalParams 
)
static

Imports an ASCII file into an ComplexAmplitude.

Parameters
importASCIIParamContains all necessary parameters to import.
additionalParamsAdditional parameters for interpretation of imported data.
Returns
Imported ComplexAmplitude.

◆ ImportASCII() [3/3]

static ComplexField ImportASCII ( string  fileName,
char  columnSeparator = ' ',
char  decimalSeparator = '.',
PrecisionMode  precisionMode = PrecisionMode.Double 
)
static

Imports an ASCII file into a ComplexField.

Parameters
fileNameThe name of the file to import.
columnSeparatorOptional parameter giving the column separator. Default value is a space.
decimalSeparatorOptional parameter giving the decimal parameter. Default value is a dot.
precisionModeOptional parameter giving the precision mode of the imported field. Default is double precision.
Returns
The imported data as a ComplexField.

◆ ImportBitmap()

static ComplexAmplitude ImportBitmap ( string  fileName,
ColorMapping  colorMapping,
AdditionalCAImportParams  parameter 
)
static

Imports the given image to ComplexAmplitude with given ColorMapping.

Parameters
fileNameFile name (including path) of the bitmap file to be imported.
colorMappingColor Mapping.
parameterAdditional import parameters.
Returns
Imported ComplexAmplitude.

◆ ImportBitmapQuantizedHeightProfile() [1/2]

static ComplexAmplitude ImportBitmapQuantizedHeightProfile ( string  fileName,
double  heightIncrement,
bool  invert,
bool  importGDSII,
SamplingParameters  samplingForGDSII 
)
static

Imports a quantized bitmap into a ComplexAmplitude representing the height profile.

Parameters
fileNameName of the file.
heightIncrementNeeds number of quantization levels for proper calculation of phase
invertif set to true invert the layers.
importGDSIIif set to true import GDSII.
samplingForGDSIIThe sampling parameters imported from the XML file. Used to ease the GDSII import.
Returns
The imported ComplexAmplitude.

◆ ImportBitmapQuantizedHeightProfile() [2/2]

static ComplexAmplitude ImportBitmapQuantizedHeightProfile ( string[]  fileNames,
double  heightIncrement,
int  numberOfLayers,
bool  invert,
bool  importGDSII,
SamplingParameters  samplingForGDSII 
)
static

Imports a quantized bitmap into a ComplexAmplitude representing the height profile.

Parameters
fileNamesarray of file names
heightIncrementNeeds number of quantization levels for proper calculation of phase
numberOfLayersThe number of layers.
invertif set to true invert the layers.
importGDSIIif set to true import GDSII.
samplingForGDSIIThe sampling parameters imported from the XML file. Used to ease the GDSII import.
Returns
The imported ComplexAmplitude.

◆ ImportCa()

static ComplexAmplitude ImportCa ( string  fileName,
out Rectangle  selectedRegion,
AdditionalCAImportParams  additionalParams 
)
static

Imports ComplexAmplitude from ca file. (VirtualLab 1.x)

Parameters
fileNameFilename.
additionalParamsAdditional import parameters.
selectedRegionReturns selection rectangle of VirtualLab 1 Complex Amplitude by reference. (Selection is not stored in ComplexAmplitude. of VirtualLab .)
Returns
Imported ComplexAmplitude.