v_sim.Colorization

g GObject.GInterface GObject.GInterface v_sim.NodeMasker v_sim.NodeMasker GObject.GInterface->v_sim.NodeMasker v_sim.Sourceable v_sim.Sourceable GObject.GInterface->v_sim.Sourceable GObject.Object GObject.Object v_sim.DataColorizer v_sim.DataColorizer GObject.Object->v_sim.DataColorizer v_sim.Colorization v_sim.Colorization v_sim.DataColorizerShaded v_sim.DataColorizerShaded v_sim.DataColorizer->v_sim.DataColorizerShaded v_sim.DataColorizerShaded->v_sim.Colorization v_sim.NodeMasker->v_sim.Colorization v_sim.Sourceable->v_sim.DataColorizer

Subclasses:

None

Methods

Inherited:

v_sim.DataColorizerShaded (2), v_sim.DataColorizer (5), GObject.Object (37), v_sim.Sourceable (8), v_sim.NodeMasker (3)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_fromCLI (dataObj)

getColUsed ()

getFile ()

getMax (column)

getMin (column)

getNColumns ()

getRestrictInRange ()

getScaleType ()

getScalingUsed ()

getSingleColumnId ()

setBox (box)

setColUsed (val, pos)

setColUsedArr (vals)

setMax (max, column)

setMin (min, column)

setNodeModel (values)

setRestrictInRange (status)

setScaleType (scale)

setScalingUsed (val)

Virtual Methods

Inherited:

v_sim.DataColorizerShaded (1), v_sim.DataColorizer (2), GObject.Object (7), v_sim.Sourceable (1), v_sim.NodeMasker (2)

Properties

Inherited:

v_sim.DataColorizerShaded (1), v_sim.DataColorizer (1), v_sim.Sourceable (2)

Name

Type

Flags

Short Description

apply-all

bool

r/w

apply colorization on all nodes

box

v_sim.Box

r/w

box

column-blue

int

r/w

column the blue channel is read from

column-green

int

r/w

column the green channel is read from

column-red

int

r/w

column the red channel is read from

column-size

int

r/w

column the size factor is read from

data-min-max

GLib.Array

r

min / max values of data

n-columns

int

r

number of columns

normalisation

int

r/w

input normalisation scheme

range-min-max

GLib.Array

r/w

min / max range to normalise data

single-param

int

r/w

colorization data is single variable

single-range

r

applied min and max values

source-file

str

r

Source file if any

Signals

Inherited:

v_sim.DataColorizer (1), GObject.Object (1), v_sim.NodeMasker (1)

Fields

Inherited:

v_sim.DataColorizer (1), GObject.Object (1), v_sim.NodeMasker (1)

Name

Type

Access

Description

parent

v_sim.DataColorizerShaded

r

priv

v_sim.ColorizationPrivate

r

Class Details

class v_sim.Colorization(**kwargs)
Bases:

v_sim.DataColorizerShaded, v_sim.NodeMasker

Abstract:

No

Structure:

v_sim.ColorizationClass

An opaque structure to store colorisation settings.

New in version 3.7.

classmethod new()
Returns:

a newly created v_sim.Colorization.

Return type:

v_sim.Colorization

Create a new object to store colorisation data.

New in version 3.7.

classmethod new_fromCLI(dataObj)
Parameters:

dataObj (v_sim.Data) – a v_sim.Data object.

Raises:

GLib.Error

Returns:

a newly created v_sim.Colorization object.

Return type:

v_sim.Colorization

Use all command line options related to colorization to create a new colorization object, storing its values in dataObj.

New in version 3.8.

getColUsed()
Returns:

a three value array, own by V_Sim. It should not be freed.

Return type:

[int]

This method is used to retrieve the vector used to adapt or not the colour to the value of the loaded data.

getFile()
Returns:

the name of the input data file if set.

Return type:

str

If the given self has an input data file already loaded, it returns its name.

getMax(column)
Parameters:

column (int) – a column id.

Returns:

the maximum bound if self is not None or the default value if not.

Return type:

float

Retrieve the maximum value used when scaling is user defined.

getMin(column)
Parameters:

column (int) – a column id.

Returns:

the minimum bound if self is not None or the default value if not.

Return type:

float

Retrieve the minimum value used when scaling is user defined.

getNColumns()
Returns:

this number of columns, or -1 if none.

Return type:

int

This method is used to retrieve the number of columns of data read in the loaded file.

getRestrictInRange()
Returns:

True if colourisation is done only if values are in range.

Return type:

bool

The colourisation can be applied on all nodes or on nodes within range. See v_sim.Colorization.setRestrictInRange().

New in version 3.7.

getScaleType()
Returns:

the scaling method if self is not None or the default value if not.

Return type:

v_sim.ColorizationInputScaleId

Retrieve the scaling method of input data associated to the given self.

getScalingUsed()
Returns:

-1 if no scaling is used.

Return type:

int

Retrieve if a column is used as entry to scale the nodes.

getSingleColumnId()
Returns:

False if several columns are used, or True if a single column is used for the colourisation.

id:

a location to store a column id.

Return type:

(bool, id: int)

The colourisation can be applied from values coming from several columns. But, if only one column is used, this routine will give it in id.

setBox(box)
Parameters:

box (v_sim.Box or None) – a v_sim.Box object.

Returns:

True if value has been changed.

Return type:

bool

Change the associated box for self. This box is used for the coordinate colourisation.

New in version 3.8.

setColUsed(val, pos)
Parameters:
  • val (int) – a column id a special value ;

  • pos (int) – an integer in [0;2].

Returns:

True if v_sim.NodeArray ::RenderingChanged should be emitted.

Return type:

bool

Choose if the loaded value should change the given channel of the colour.

setColUsedArr(vals)
Parameters:

vals ([int]) – the new columns to be used per channel.

Returns:

True if any changes.

Return type:

bool

Setup all three channels at once, see v_sim.Colorization.setColUsed().

New in version 3.8.

setMax(max, column)
Parameters:
  • max (float) – a floating point value.

  • column (int) – a column id.

Returns:

True if v_sim.NodeArray ::RenderingChanged should be emitted.

Return type:

bool

When the scaling method is v_sim.ColorizationInputScaleId.MINMAX (see v_sim.ColorizationInputScaleId) min and max value for convert input data are user defined. Use this method to choose the maximum bound. This method raises a error if no input file has already been associated to the give visuData.

setMin(min, column)
Parameters:
  • min (float) – a floating point value.

  • column (int) – a column id.

Returns:

True if v_sim.NodeArray ::RenderingChanged should be emitted.

Return type:

bool

When the scaling method is v_sim.ColorizationInputScaleId.MINMAX (see v_sim.ColorizationInputScaleId) min and max value for convert input data are user defined. Use this method to choose the minimum bound. This method raises a error if no input file has already been associated to the give visuData.

setNodeModel(values)
Parameters:

values (v_sim.NodeValuesFarray or None) – a v_sim.NodeValuesFarray object.

Change the v_sim.NodeValuesFarray this self is associated to.

New in version 3.8.

setRestrictInRange(status)
Parameters:

status (bool) – a boolean.

Returns:

True if the status is changed indeed.

Return type:

bool

The colourisation can be applied on all nodes or on nodes within range. See v_sim.Colorization.getRestrictInRange() and v_sim.Colorization.setMin() and v_sim.Colorization.setMax().

New in version 3.7.

setScaleType(scale)
Parameters:

scale (v_sim.ColorizationInputScaleId) – an integer.

Returns:

True if v_sim.NodeArray ::RenderingChanged should be emitted.

Return type:

bool

This method is used to change the scale method used on input data. See v_sim.ColorizationInputScaleId for further informations. This method raises a error if no input file has already been associated to the give visuData.

setScalingUsed(val)
Parameters:

val (int) – a column id.

Returns:

True if the status changed.

Return type:

bool

Give the column id to used to take the scaling values from. Set -1 if no scaling used. The scaling is used to change the size of each node, using an homothetic factor.

Property Details

v_sim.Colorization.props.apply_all
Name:

apply-all

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

apply colorization on all nodes

v_sim.Colorization.props.box
Name:

box

Type:

v_sim.Box

Default Value:

None

Flags:

READABLE, WRITABLE

box

v_sim.Colorization.props.column_blue
Name:

column-blue

Type:

int

Default Value:

-4

Flags:

READABLE, WRITABLE

column the blue channel is read from

v_sim.Colorization.props.column_green
Name:

column-green

Type:

int

Default Value:

-4

Flags:

READABLE, WRITABLE

column the green channel is read from

v_sim.Colorization.props.column_red
Name:

column-red

Type:

int

Default Value:

-4

Flags:

READABLE, WRITABLE

column the red channel is read from

v_sim.Colorization.props.column_size
Name:

column-size

Type:

int

Default Value:

-4

Flags:

READABLE, WRITABLE

column the size factor is read from

v_sim.Colorization.props.data_min_max
Name:

data-min-max

Type:

GLib.Array

Default Value:

None

Flags:

READABLE

min / max values of data

v_sim.Colorization.props.n_columns
Name:

n-columns

Type:

int

Default Value:

0

Flags:

READABLE

number of columns

v_sim.Colorization.props.normalisation
Name:

normalisation

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

input normalisation scheme

v_sim.Colorization.props.range_min_max
Name:

range-min-max

Type:

GLib.Array

Default Value:

None

Flags:

READABLE, WRITABLE

min / max range to normalise data

v_sim.Colorization.props.single_param
Name:

single-param

Type:

int

Default Value:

-4

Flags:

READABLE, WRITABLE

colorization data is single variable

v_sim.Colorization.props.single_range
Name:

single-range

Type:

Default Value:

None

Flags:

READABLE

applied min and max values

v_sim.Colorization.props.source_file
Name:

source-file

Type:

str

Default Value:

None

Flags:

READABLE

Source file if any