OrsDatasetConvertor

Converts data type of datasets

author:ORS Team
contact:http://theobjects.com
email:info@theobjects.com
organization:Object Research Systems (ORS), Inc.
address:460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7
copyright:Object Research Systems (ORS), Inc. All rights reserved 2021.
date:Oct 05 2015 16:44
dragonflyVersion:
 3.0
UUID:22d4a214761111e78995448a5b5d70c0

Class Code

class OrsPythonPlugins.OrsDatasetConvertor.OrsDatasetConvertor.OrsDatasetConvertor(varname=None)
UIDescriptors = [<ORSServiceClass.OrsPlugin.uidescriptor.UIDescriptor object>]
classmethod contextualMenu(context)
classmethod convertDataset(dataset, newType, createNewDataset, minNormalize=None, maxNormalize=None, minFilter=None, maxFilter=None, replacement=None, IProgress=None)

Converts a dataset to a specified data type

Both optional values minNormalize and maxNormalize should be given to use the normalization.

All optional values minFilter, maxFilter and replacement should be given to use the filtering.

Deprecated since version 2021.3: Use convertDatasetOnSelf or convertDatasetCreateNew

Parameters:
  • dataset (ORSModel.ors.Channel) – dataset to convert
  • newType (IntEnum CxvChannel_Data_Type) – datatype of the converted dataset
  • createNewDataset (bool) – if True, a new dataset will be created. Otherwise, the given dataset will be modified.
  • minNormalize (float) – lower bound of normalization range (optional)
  • maxNormalize (float) – higher bound of normalization range (optional)
  • minFilter (float) – lower bound of filter range (optional)
  • maxFilter (float) – higher bound of filter range (optional)
  • replacement (float) – replacement value for the filter (optional)
  • IProgress (ORSModel.ors.Progress) – progress object
Returns:

newDataset (ORSModel.ors.Channel) – converted dataset

classmethod convertDatasetAndPublish(dataset, newType, createNewDataset, useNormalization=False, minNormalize=None, maxNormalize=None, useFiltering=False, minFilter=None, maxFilter=None, replacement=None)
interfacemethod convertDatasetCreateNew(dataset, newType, minNormalize=None, maxNormalize=None, minFilter=None, maxFilter=None, replacement=None, aProgress=None)

Converts a dataset to a specified data type. A new dataset is created.

Both optional values minNormalize and maxNormalize should be given to use the normalization.

All optional values minFilter, maxFilter and replacement should be given to use the filtering.

Parameters:
  • dataset (ORSModel.ors.Channel) [const] – dataset to convert
  • newType (IntEnum CxvChannel_Data_Type) – datatype of the converted dataset
  • minNormalize (float) – lower bound of normalization range (optional)
  • maxNormalize (float) – higher bound of normalization range (optional)
  • minFilter (float) – lower bound of filter range (optional)
  • maxFilter (float) – higher bound of filter range (optional)
  • replacement (float) – replacement value for the filter (optional)
  • aProgress (ORSModel.ors.Progress) – progress object
Returns:

newDataset (ORSModel.ors.Channel) – converted dataset

interfacemethod convertDatasetOnSelf(dataset, newType, minNormalize=None, maxNormalize=None, minFilter=None, maxFilter=None, replacement=None, aProgress=None)

Converts a dataset to a specified data type. The modifications are applied on this dataset.

Both optional values minNormalize and maxNormalize should be given to use the normalization.

All optional values minFilter, maxFilter and replacement should be given to use the filtering.

Parameters:
  • dataset (ORSModel.ors.Channel) – dataset to convert
  • newType (IntEnum CxvChannel_Data_Type) – datatype of the converted dataset
  • minNormalize (float) – lower bound of normalization range (optional)
  • maxNormalize (float) – higher bound of normalization range (optional)
  • minFilter (float) – lower bound of filter range (optional)
  • maxFilter (float) – higher bound of filter range (optional)
  • replacement (float) – replacement value for the filter (optional)
  • aProgress (ORSModel.ors.Progress) – progress object
getChannelGUID()
classmethod getMainFormClass()

Gets the class of the main form

Returns:output
getSourceStructuredGrid()
keepAlive = False
multiple = False
classmethod openDatasetConverterAction(channelGUID)
savable = False
selectedObjectsChanged()
setChannelGUID(guid)
setSourceStructuredGrid(structuredGrid)